Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- #include <algorithm>
- #include <string>
- #include <iomanip>
- #include <vector>
- using namespace std;
- int main()
- {
- int start, end, n;
- setlocale(LC_ALL, "rus");
- cout << "Исходное число: ";
- cin >> start;
- cout << "Конечное число: ";
- cin >> end;
- n = end - start + 1;
- vector <int> programms(n, 0);
- vector <int> slojenie;
- vector <int> umnojenie;
- string temp;
- getline(cin, temp);
- for (int i = 0; i < temp.size(); i++) {
- if (temp[i] == '*') {
- umnojenie.push_back(temp[i + 1]);
- }
- else if (temp[i] == '+') {
- slojenie.push_back(temp[i + 1]);
- }
- }
- cout << umnojenie[0] * 3;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement