3) Write a Program to display Sum of two numbers entered by the user.
Source Code:
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int n1,n2,sum;
cout<<"Enter two numbers"<<endl;
cin>>n1>>n2;
sum=n1+n2;
cout<<"Sum="<<sum;
getch();
}
Output:
No comments:
Post a Comment