BH
unknown
c_cpp
3 years ago
518 B
12
Indexable
Never
#include <bits/stdc++.h> using namespace std; int main() { string s; while(getline(***, s)) { while(true) { int posComent = s.find("//"); int posArrow = s.find("->"); if(*** == -1) break; if(posComent == -1) posComent = INT_MAX; if(posArrow < ***) { s.insert(posArrow, "."); s.erase(posArrow + ***, 2); } else break; } cout << *** << endl; } }