Thursday, March 7, 2013

Addition with two variables


Write a program for addition using only two variables.

#include <iostream.h>
#include <conio.h>
void main()
{
int a,b;
cout<<"Enter value for a: ";
cin>>a;
cout<<"Enter value for b: ";
cin>>b;
cout<<"a+b = " <<a+b;

getch();
}

No comments:

Post a Comment