Read OnLine C- Program Example
04_LOOP CONCEPT (03_DO WHILE LOOP) | |
---|---|
PRAC 5 | PRAC 6 |
//wap to print table number #include<stdio.h> #include<conio.h> void main() { int i,n; clrscr(); printf("Enter table number:"); scanf("%d",&n); i=1; do { printf("%d \n",i*n); i++; } while (i<=10); getch(); } ------output------ Enter table number:2 2 4 6 8 10 12 14 16 18 20 |
//wap to print table number #include<stdio.h> #include<conio.h> void main() { int i,n; clrscr(); printf("Enter table number:"); scanf("%d",&n); i=10; do { printf("%d \n",i*n); i--; } while (i>=1); getch(); } ------output------- Enter table number:2 20 18 16 14 12 10 8 6 4 2 |
Previous | Next |
Download | Download |