Write a program to print the table of number input by the user.

//program to print the table of number input by the user.


#include<stdio.h>

int main()
{

int n;

printf("enter any number\n");

scanf("%d", &n);

for(int i=1; i<=10; i++){
printf("%d\n", n*i);

}

return 0;
}

Output :

enter any number
2
2
4
6
8
10
12
14
16
18
20

--------------------------------
Process exited after 4.045 seconds with return value 0
Press any key to continue . .

Comments

Popular posts from this blog

program to (keep taking number as input from user until user enters a number which is multiple of 5.)

write a program to print the numbers from 0 to n, if n is given by user.

Write a program to print the average of 3 numbers.