Foundations of Programming
Assignment No. : 6
PROBLEM STATEMENT: Write a program in C to generate multiplication tables.
OBJECTIVE:
1. To understand the concept of loops in C.
2. To implement the generation of multiplication tables using iteration.
THEORY:
1. What is a loop in C programming?
2. What are the different looping structures in C .
PLATFORM: Linux
INPUT:
Enter the number for which the table is to be generated
OUTPUT:
Multiplication Table
Example: Multiplication Table for 5 up to 10: 5 x 1 = 5 5 x 2 = 10 5 x 3 = 15 5 x 4 = 20
5 x 5 = 25 5 x 6 = 30 5 x 7 = 35 5 x 8 = 40 5 x 9 = 45 5 x 10 = 50
CONCLUSION: Thus, we have implemented a C program to generate multiplication
tables using loops.
FAQs:
1. Can we use any loop to generate multiplication tables?
2. What is the difference between a while loop and a for loop?
3. When should we use a do-while loop instead of a while loop?
4. What are the advantages of using a for loop?