C program: Addition of two values

CWC
0 Min Read

C program to add two values: This C language program perform the arithmetic operation of addition on two values and then prints the sum on the screen.

#include<stdio.h>
#include<conio.h>
main()
{  
int value1,value2,sum;  
clrscr();
printf("\nEnter two integer values : ");     
scanf("%d %d",&value1,&value2);  
sum = value1 + value2;
printf("\n%d + %d = %d",value1,value2,sum);
getch(); 
 return 0;
}

 

Share This Article
Leave a comment

Leave a Reply

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

English
Exit mobile version