Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # include <iostream>
- using namespace std;
- #include <iomanip>
- #include <math.h>
- #include <cmath>
- #include <string>
- int main()
- {
- string temp;
- cin >> temp;
- int sum = 0;
- do {
- int num = atoi(temp.c_str());
- sum += num;
- cin >> temp;
- } while (temp != "Stop");
- cout << sum << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement