WAP to output the following multiplication table:

5 x 1 = 5
5 x 2 =10
5 x 3 = 15

5 x 10 = 50

//E Balagurusamy, Programming In ANSI C,4E
//Exercise 1.6, page 21

#include <stdio.h>

#define MUL 5

int main (void)
{int i;
printf("\n\n");

for (i=1;i<=10;i++)
    {printf("%d  *  %d  =  %d\n",MUL,i,(MUL*i));
    }

printf("\n\n");
return 0;
}

Comments