Write a program adding of two numbers:-


//Two Number Adding Program

#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int a,b,sum;

printf("Enter any two numbers to sum:");
scanf("%d%d",&a,&b);
sum=a+b;
printf("Sum of two numbers is:%d",sum);
getch();
}

Output:


Enter any two numbers to sum:4
6
Sum of two numbers is:10

			

Previous Next