{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

N printfd else else printfd is not prime numbern

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ntf(“Total : %d “,sum); printf(“Total } Body of The loop Test Condition ? True False Following Statement /* average of 5 numbers */ /* #include<stdio.h> int main() { int count = 1; int float x, sum = 0; float do { do printf(“x = “); printf(“x scanf(“%f”,&x); scanf(“%f”,&x); sum += x; sum ++ count; ++ } while(count <= 5); while(count printf(“Average = %f “, (sum/5)) printf(“Average } for -- Statement for Entry Initialization Statement False Following Statement Increment Statement Test Condition ? True Body of The loop /* check whether a number is prime or not */ #include<stdio.h> int main() { int n,i,factors = 0; int printf("Enter a number : "); printf("Enter scanf("%d",&n); scanf("%d",&n); for(i = 1; i <= n; i++) { for(i if((n % i)==0) ++factors; if((n } if (factors == 2) if printf("%d is prime number.",...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online