Algorithm, Flowchart ad c Program to write a Table of a number.
Algorithm :-
step 1: Read a number (n)
step 2: i=1
step 3: print n*i
step 4: i=i+1
step 5: if i<11 or i<=10 goto step 3
step 6: STOP
Flowchart :-
#include<conio.h>
void main()
{ int i,n,table=1;
clrscr();
printf("Enter any number\n");
scanf("%d",&n);
printf("Table of %d is\n",n);
for(i=1;i<=10;i++)
{
table=n*i;
printf("%d",table);
printf("\n");
}
getch();
}
Comments
Post a Comment