Sunday, March 19, 2023

"multiplication table for any integer " in c .

  //multiplication table for any integer

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

enter the value of an integer :9 the multiplication table of 9 is : 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 ("...