Read OnLine C- Program Example
04_LOOP CONCEPT (01_FOR 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); for (i=1;i<=10;i++) { printf("%d \n",i*n); } getch(); } ------output-------- Enter table number:4 4 8 12 16 20 24 28 32 36 40 |
//wap to print table numbert #include<stdio.h> #include<conio.h> void main() { int i,n; clrscr(); printf("Enter table number:"); scanf("%d",&n); for (i=10;i>=1;i--) { printf("%d \n",i*n); } getch(); } -----output----- 40 36 32 28 24 20 16 12 8 4 |
Previous | Next |
Download | Download |