Add Two Integers (in C++)
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int i,j,k;
cout<<"Enter the value of i & j"<<endl;
cin>>i>>j;
k=i+j;
cout<<"sum="<<k;
getch();
}
Output :
Enter the value of i & j
25
40
sum=65
No comments:
Post a Comment