Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- #include <iostream>
- using namespace std;
- string words, str1, str2, str3;
- void read_string() {
- int n, flag = 0;
- char caracter;
- cin >> n;
- //int spaces = n;
- for (int i = 0; i < words.size(); ++i) {
- if (caracter == '#' || caracter == ' ') {
- if (flag == 0) {
- str1.push_back(caracter);
- } else {
- str3.push_back(caracter);
- }
- } else {
- str2.push_back(caracter);
- }
- }
- cout << str3 << str2 << str1 << endl;
- }
- int main() {
- int quant, i;
- int n;
- cin >> quant;
- for (i = 0; i < quant; ++i) {
- cin >> n;
- cin >> words;
- cout << words << endl;
- //read_string();
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement