You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
371 B
C++
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;
|
|
}
|