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); } }