How to print the table of given number by user in c program

How to print the table of given number by user in c program


#include<stdio.h>

int main(){


int i,a,c;     //a is any number given by user whose table is to be print.


printf("enter any number");

scanf("%d",&a);


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

}


}

How to print the table of given number by user in c program

Comments

Post a Comment

Popular posts from this blog

c program to convert any three digit number in words

c program to remove characters in string except alphabets