Please enter your email:
1. Print even numbers from 1 to 20
for(i = 2; i <= 20; i++) if(?) printf(“%d “, i);
2. Check character is vowel
if(?) printf(“Vowel”);
3. Print numbers 1 to 10
for(i = 1; ? ; i++) printf(“%d “, i);
4. 2-digit number check
if(?) printf(“Two digit number”);
5. Biggest of three numbers
if(?) printf(“A biggest”); else if(b > c) printf(“B biggest”); else printf(“C biggest”);
6. Leap year check
if(?) printf(“Leap Year”); else printf(“Not Leap Year”);
7. Check even or odd
if(?) printf(“Even”); else printf(“Odd”);
8. Sum of even numbers from 1 to n
sum = 0; for(i = 1; i <= n; i++) { if(?) sum = sum + i; }
9. Perfect number check
sum = 0; for(i = 1; ? ; i++) { if(n%i==0) sum += i; } if(sum == n) printf(“Perfect Number”);
10. Perfect number check
sum = 0; for(i = 1; i < n; i++) { if(?) sum += i; } if(sum == n) printf(“Perfect Number”);
Question 1 of 10
Your email address will not be published. Required fields are marked *
Comment *
Name *
Email *
Website
Save my name, email, and website in this browser for the next time I comment.