0% found this document useful (0 votes)
2 views

OS 2 c

The document presents a C program that generates a multiplication table for a user-specified number. It prompts the user to enter a number and then displays the multiplication results from 1 to 10 for that number. An example output for the number 7 is provided, showing the complete multiplication table.

Uploaded by

jayaprakash9223
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

OS 2 c

The document presents a C program that generates a multiplication table for a user-specified number. It prompts the user to enter a number and then displays the multiplication results from 1 to 10 for that number. An example output for the number 7 is provided, showing the complete multiplication table.

Uploaded by

jayaprakash9223
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Sprno:9223

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

You might also like