basic programming for beginners
i make programming easy....!
Monday, 21 May 2012
LOOPS IN C WHILE STATEMENT (PROGRAM TO GENEARTE TABLE OF A GIVEN NUMBER )
#include<stdio.h>
#include<conio.h>
void main(){
int num,i=1,t;
clrscr();
printf("enter the num");
scanf("%d",&num);
while(i<=10)
{t=num*i;
i++;
printf(" %d",t);
}
}
Output:-
enter the num2
2 4 6 8 12 16 18 20
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment