Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- setlocale(LC_ALL, "rus");
- int N;
- cout << "Введите длинну строки: ";
- cin >> N;
- cin.get();
- char *stroka = new char[N];
- cout << "Введите строку: ";
- cin.getline(stroka, N);
- N = strlen(stroka);
- for (int i = 0; i < N; i++) {
- if (stroka[i] == '/' && stroka[i + 1] == '*') {
- for (int j = i + 2; j - 1 < N; j++) {
- if (stroka[j] == '*' && stroka[j + 1] == '/') {
- i = j + 1;
- break;
- }
- cout << stroka[j];
- } cout << endl;
- }
- }
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement