Wednesday, January 23, 2019

Write a program in C++ to add two numbers.

Write a program in C++ to add two numbers.


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

Output:

No comments:

Post a Comment