Write a program in C to print even numbers upto 100 using do-while statement.
Answers
Answered by
3
Answer:
FIRST. int main() { int i=0; while(i<100) { i+=2; printf("%d ",i); } return 0; }
second. int main() { int i=0; while(1) { i+=2; printf("%d ",i); if(i>=100) break; } return 0; }
Third. int main() { int i=0; while(1) { i++; if(i%2!=0) continue; printf("%d ",i); if(i>=100) break; } return 0; }
Forth.
Similar questions