Read OnLine Cpp Program Example
4 - LOOP CONCEPT | |
---|---|
PRAC 3 | PARC 4 |
//wap to print table number #include<iostream.h> #include<conio.h> void main() { int i; clrscr(); i=1; while (i<=10) { cout<<"\n"<<i*2; i++; } getch(); } -------output------ 2 4 6 8 10 12 14 16 18 20 |
//wap to print table number #include<iostream.h> #include<conio.h> void main() { int i; clrscr(); i=10; while (i>=1) { cout<<"\n"<<i*2; i--; } getch(); } -------output------- 20 18 16 14 12 10 8 6 4 2 |
Previous | Next |
Download | Download |