C program to display multiplication table from N to M

C program to display multiplication table from N to M

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

 C program to display multiplication table of N X M 

for example multiplication 11 to 20 or 21 to 30

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

#include<stdio.h>

#include<conio.h>

void main()

{

    int i,j,n,m,table;

    //clrscr();

    printf("From what number to which number you want multiplication table\n");

    scanf("%d%d",&n,&m);

    printf("Multiplication table of %d To %d is as follows\n",n,m);

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

    {

        for(j=n;j<=m;j++)

        {

            

        table=i*j;

        printf("\t%d",table);

    }

    printf("\n");

    }

    printf("\nEnd of program");

}

  

From what number to which number you want multiplication table

12 1 20

Multiplication table of 11 To 20 is as follows

11 12 13 14 15 16 17 18 19 20

22 24 26 28 30 32 34 36 38 40

33 36 39 42 45 48 51 54 57 60

44 48 52 56 60 64 68 72 76 80

55 60 65 70 75 80 85 90 95 100

66 72 78 84 90 96 102 108 114 120

77 84 91 98 105 112 119 126 133 140

88 96 104 112 120 128 136 144 152 160

99 108 117 126 135 144 153 162 171 180

110 120 130 140 150 160 170 180 190 200


End of program


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

0 टिप्पण्या