Important Questions

C++ Program to add two numbers

//C++ Program to add two numbers
//header files
#include<iostream.h>
#include<conio.h>

void main()
{

clrscr();
int a,b,sum;        //declaring variables
cout<<"Enter two numbers to add\n";
cin>>a>>b;        //getting integers
sum=a+b;
cout<<"Sum of two numbers:"<<sum;        //printing sum
getch();

}
//Now run the program by ctrl+f9

Output


You can also see a video how to run this program