Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<set>
- #include<vector>
- #include<algorithm>
- #include<set>
- #include<vector>
- #include<string>
- #include<stdlib.h>
- #include<math.h>
- #include<stdio.h>
- using namespace std;
- void probel(int x)
- {
- for (int i = 0; i < x; i++)
- {
- cout << " ";
- }
- }
- int main()
- {
- string a;
- cin >> a;
- int q = 0;
- int i = 0;
- while (i != a.size())
- {
- string block;
- if (a[i] == '<')
- {
- block += a[i];
- i++;
- while (a[i] != '>')
- {
- block += a[i];
- i++;
- }
- }
- if (block.size() == 3)
- {
- probel(q);
- cout << block << endl;
- q += 2;
- }
- else
- {
- q -= 2;
- probel(q);
- cout << block << endl;
- }
- i++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement