Type a number: 5
Type another number: 2
Sum is :7
#include <iostream>
using namespace std;
int main()
{
double num1;
double num2;
double sum;
cout << "Type number: ";
cin >> num1;
cout << "Typer another number: ";
cin >> num2;
sum = num1 + num2;
cout << "Sum is: " << sum;
return 0;
}
Comments
Leave a comment