C Program For Addition Table Using For Loop

C Program For Addition Table Using For Loop. Finding the addition table of a given number using for loop in C programming. If you are looking for a C program to find addition table example, this C programming tutorial will help you to learn how to write a program for addition table in C. Just go through this C programming example to learn about printing addition of a number.

C Program For Addition Table

Learn how to write a  c Program to Display addition table of a number. Writing addition table program in C can be done using various techniques but here in this program, we show how to write a c addition table program using for loop in a proper way. Happy coding.

C Program For Addition Table Using For Loop – Source Code

You can copy paste the below C Program For Addition Table Using While Loop, in c compiler to check how the source code work. Or write your own addition table C Program with the help of this below c programming tutorial.

Source Code:

/* C PROGRAM FOR ADDITION TABLE - ADDITIONTABLE.C */

#include<stdio.h>
#include<conio.h>
void main()
{
    int i, t, n ; //variable declaration
    clrscr() ;
    printf("Enter the table : ") ;
    scanf("%d", &t) ; //reading input from user
    printf("\nEnter the limit : ") ;
    scanf("%d", &n) ; //reading the limit of the table
    printf("\nThe table is :\n\n") ;

//c program logic for addition table using for loop
    for(i = 1 ; i <= n ; i++)
    printf("%4d + %4d = %4d\n", i, t, i + t) ;
    getch() ;
}

C Program For Addition Table – OUTPUT

After you compile and run the above c program for addition table, your C compiler asks you to enter the number to print the addition table. After you enter a number, the program will be executed and give output.

Output:

Enter the table : 5

Enter the limit : 15

The table is :
1 + 5 = 6
2 + 5 = 7
3 + 5 = 8
4 + 5 = 9
5 + 5 = 10
6 + 5 = 11
7 + 5 = 12
8 + 5 = 13
9 + 5 = 14
10 + 5 = 15

C PROGRAMMING TUTORIALS

  1. Denomination Program in C
  2. C Program to Print Multiplication Table 
  3. C Program Array with Example
  4. Binary Search in C Program Using Recursion
  5. Bubble Sort in C Using Pointers
  6. Bubble Sort Program in C Using Recursion
  7. Bubble Sort Program in C Using Array
  8. Bubble Sort Program in C Using Function
  9. Bubble Sort Program in C Using Linked List
  10. Stack Push Pop Program in C Using Arrays
  11. Factorial Program in C Using Pointers
  12. Factorial Program in C Using While Loop
  13. C Program For Factorial Using For Loop
  14. Factorial Program in C Using Recursion Function
  15. C Program To Reverse a String Using Pointers
  16. C Program To Swap Two Numbers Using Two Variables
  17. C Program To Swap Two Numbers Using Three Variables
  18. C Program For Prime Numbers – Check  a Number is Prime or Not
  19. C Program To Reverse a String with Using Function
  20. C Program to Reverse a String without Using Function

Leave a Reply

Your email address will not be published. Required fields are marked *