Read OnLine C- Program Example

04_LOOP CONCEPT (01_FOR LOOOP)
PRAC 3 PRAC 4
//wap to print table number
#include<stdio.h>
#include<conio.h>
void main()
{
int i;
clrscr();
for (i=1;i<=10;i++)
{
printf("%d \n",i*2);
}
getch();
}
-----output-----
2
4
6
8
10
12
14
16
18
20
//wap to table number
#include<stdio.h>
#include<conio.h>
void main()
{
int i;
clrscr();
for (i=10;i>=1;i--)
{
printf("%d \n",i*2);
}
getch(); }
------output-------
20
18
16
14
12
10
8
6
4
2
Previous Next
Download Download