programming-examples/c++/Others/Addition operator in cout.cpp
2019-11-15 12:59:38 +01:00

18 lines
371 B
C++

Addition operator in cout
#include <iostream>
using namespace std;
int main(void)
{
int total, added, dropped;
cout << "Enter total: ";
cin >> total;
cout << "Enter added: ";
cin >> added;
total = total + added;
cout << "Enter dropped ";
cin >> dropped;
total -= dropped;
cout << "Number: " << total << endl;
return 0;
}