Computer Science, asked by Gangotri7378, 1 year ago

Write a program in C to print even numbers upto 100 using do-while statement.

Answers

Answered by piyushsahu624
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