//Write a program to print 1 to 35 odd numbers by using while loop #include<stdio.h> #include<conio.h> void main() { int x=1; clrscr(); while(x<=70) //Multiple 35 by 2 because because upto 70 there is 35 odd numbers and 35 even numbers { printf("%d",x); x=x+2;//Eg : 1+2=3, 3+2=5, 5+2=7, ...... } getch(); }
Comments
Post a Comment