Wednesday, 16 February 2022

Table of a number in C

 #include <stdio.h>


int main()

{
    int a;
    printf("Which table do you want to see:");
    scanf("%d",&a);
    printf("The table of %d:\n",a);
    for(int i=1;i<=10;i++)
    {
       
        printf("%d",a);
        printf("x""%d:",i);
        printf("%d\n",a*i);
    }

 return 0;
}

No comments:

Post a Comment