write a C program to print table of number 1 to 20?
Answers
Answered by
1
#include<stdio.h>
void main()
{
int n,i;
printf("enter the number");
Scanf("%d" ,&n);
for(i=1 ; i<21 ; i++)
{
printf("%d * %d = %d\n",n,i,n*i);
}
}
void main()
{
int n,i;
printf("enter the number");
Scanf("%d" ,&n);
for(i=1 ; i<21 ; i++)
{
printf("%d * %d = %d\n",n,i,n*i);
}
}
Answered by
8
#include<stdio.h>
int main(void)
{
int i,j,mul;
for(i=1;i<=20;i++)
{
for(j=1;j<=10;j++)
{
mul=i*j;
printf("\n%d*%d=%d",i,j,mul);
}
printf("---------");
}
return 0;
}
int main(void)
{
int i,j,mul;
for(i=1;i<=20;i++)
{
for(j=1;j<=10;j++)
{
mul=i*j;
printf("\n%d*%d=%d",i,j,mul);
}
printf("---------");
}
return 0;
}
karinasharma:
2nd mean
Similar questions
Geography,
7 months ago
English,
7 months ago
Environmental Sciences,
7 months ago
Physics,
1 year ago
Math,
1 year ago