C program to display multiplication table

C program to display multiplication table  

/******************************************************

 C program to display multiplication table 

 ***********************************************/

#include<stdio.h>

#include<conio.h>

void main()

{

    int i,n,table;

    //clrscr();

    printf("Enter number to display multiplication table\n");

    scanf("%d",&n);

    printf("Following is multiplication table of %d\n",n);

    for(i=1;i<=10;i++)

        {

            table=n*i;

            printf("%d X %d = %d\n",n,i,table);

        }

    

    printf("\nEnd of program");

}

   

Enter number to display multiplication table

23

Following is multiplication table of 23

23 X 1 = 23

23 X 2 = 46

23 X 3 = 69

23 X 4 = 92

23 X 5 = 115

23 X 6 = 138

23 X 7 = 161

23 X 8 = 184

23 X 9 = 207

23 X 10 = 230


End of program


टिप्पणी पोस्ट करा

0 टिप्पण्या