OS 2 c
OS 2 c
2C MULTIPLICATION TABLE
PROGRAM:
#include <stdio.h>
int main()
{
int num, i = 1;
printf("Enter any number: ");
scanf("%d", &num);
printf("Multiplication table for %d:\n", num);
while(i <= 10)
{
printf("%d x %d = %d\n", num, i, num * i);
i++;
}
return 0;
}
OUTPUT:
Enter any number: 7
Multiplication table for 7:
7x1=7
7 x 2 = 14
7 x 3 = 21
7 x 4 = 28
7 x 5 = 35
7 x 6 = 42
7 x 7 = 49
7 x 8 = 56
7 x 9 = 63
7 x 10 = 70