A c++ program to print odd numbers between 0-100 using while loop
1
2
3
4
5
6
7
8
9
10
11
12
13
| #include<iostream.h> #include<conio.h> int main () { int i=1; while (i<100) { cout<< "\t" <<i; i=i+2; } getch(); return 0; } |
/*
Output:
1 3 5 ....................99
*/
No comments:
Post a Comment