Friday, 20 February 2015

How to add two numbers in C++

Here is the program to add two numbers in C++

#include<iostream.h>
#include<conio.h>
void main( )
{
clrscr( );
int a,b,c;
cout<<"Enter any two numbers for addition ";
cin>>a>>b;
c=a+b;
cout<<"Sum = "<<c;
getch( );
}

Screenshots







No comments:

Post a Comment