Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- string str;
- cin >> str;
- for(int i = 0; i < 100; i++)
- {
- if(str[i] == '+')
- {
- int num = 0;
- cin >> num;
- for(int k = 0; k < num; k++)
- {
- cout << '+';
- }
- }
- if(str[i] == '-')
- {
- int num = 0;
- cin >> num;
- for(int k = 0; k < num; k++)
- {
- cout << '-';
- }
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement