BH
unknown
c_cpp
4 years ago
518 B
20
Indexable
#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;
}
}Editor is loading...