Friday, March 28, 2014

Simple C++ program to add two numbers

#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int a,b,c;
cout<<"Enter the numbers to add"<<endl;
cin>>a>>b;
c=a+b;
cout<<"Addition of "<<a<<" and "<<b<<" is="<<c<<endl;
getch();
}

No comments:

Post a Comment