c program to generate multiplication table:
In this program we understand how to generate the table form C program by using the For Loop
and print the tables which you want
A table of numbers is created by the multipy of number a consistent number with an iterative number from 1 to 10 to get the table. At the end of the day, we can get the table of a number by duplicating the given number with counting from 1, 2, 3, 4, 5, ..., 9, 10. Furthermore, on every emphasis, the benefit of counting is increased by 1, which goes up to 10, to print a total table.
Fig= "C program to genrate the table"
Program = 1.
- #include <stdio.h>
- #include<conio.h>
- Void main()
- {
- int n, i; // declare a variable
- printf (" Enter a number which Table you want: ");
- scanf (" %d", &n); // take a number from the user
- // use the for loop to iterate the number from 1 to 10
- for ( i = 1; i <= 10; i++)
- {
- printf ("\n %d * %d = %d", num, i, (num*i));
- }
- getch();
- }