C program to print the multiplication table of 6 from 1 to 10 using for loop.
C Programming Language Loop control in C Language (Article) Loop control in C Language (Program)
4782Program:
// C program to print the multiplication table of 6 from 1 to 10. #include void main() { int i; for(i=1; i<=10; i++) { printf("6 * %d = %d\n",i,6*i); } }
Output:
6 * 1 = 6 6 * 2 = 12 6 * 3 = 18 6 * 4 = 24 6 * 5 = 30 6 * 6 = 36 6 * 7 = 42 6 * 8 = 48 6 * 9 = 54 6 * 10 = 60 Press any key to continue . . .
Explanation:
This program prints a multiplication table of 6 from 1 to 10. We have used while loop to achieve our result. Initially, i is assigned to 1. The condition to be tested is i<=10. After executing the loop each time, the value of i is increased by 1. When the value of i becomes 11, the condition becomes false and the loop is terminated.
This Particular section is dedicated to Programs only. If you want learn more about C Programming Language. Then you can visit below links to get more depth on this subject.