Program for addition of two numbers in C++ - World Of Programs

World Of Programs

Let's Be The Coder

Recent Tube

Post Top Ad

Program for addition of two numbers in C++

Program for addition of two numbers in C++

Share This
How to write a program to add two numbers in C++ language

#include <iostream.h>
#include <conio.h>
void main()
{
clrscr();
int a,b,c;
cout <<"Enter two numbers to add\n";
cin >> a >> b;

c=a+b;
cout <<"Sum of the numbers = " << c << end1;

getch();
}

OUTPUT: -
Enter two numbers to add

8
5
Sum of the numbers =  13

No comments:

Post a Comment

Post Bottom Ad

Responsive Ads Here

Pages