C Program to Print sum of two number

 

 #include <stdio.h>

#include <conio.h>

 void main()

 {   

    int a, b, c;

    printf("Enter two number: ");

    scanf("%d %d", &a, &b);

    c = a + b;     

    printf("The sum is = %d", c);

    getch();

} 

Output:

Enter two number: 10 12

The sum is = 22

Comments

Popular posts from this blog

C Program to print swap number using third variables

C Program to open and write to a text file using fprintf.