Wednesday, April 19, 2023

create a multiplication table of any number

  /*create a multiplication table of  any number  */


#include "stdio.h"
int main (){
int num,i,mul;//mul---> multiplication
printf ("enter any integer number :");
scanf ("%i",&num);
printf ("the multiplication table is: \n");
for (i=1;i<=10 ;i++){
    mul=num*i;//mul---> multiplication
    printf ("  %i*%i=%i \n",num,i,mul);
}
return 0;
}

output output output output
9*1=9 9*2=18 9*3=27 9*4=36 9*5=45 9*6=54 9*7=63 9*8=72 9*9=81 9*10=90

No comments:

Post a Comment

print a multiplication table of any integer taking from user

 // print a multiplication table of any integer taking from user  #include "stdio.h" int main () { int n,mul,i; printf ("...