Created
January 12, 2017 17:10
-
-
Save nm17/f8a68d82da2fdb47c03bb94c188e9370 to your computer and use it in GitHub Desktop.
Interlang
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. | |
* If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. | |
*/ | |
#include <iostream> | |
#include <cstring> | |
std::string split(std::string string); | |
int main() { | |
std::string a; | |
std::cin >> a; | |
std::string b = split(a); | |
int pos = 0; | |
while (1) { | |
if (b[pos] == 'o') | |
{ | |
pos++; | |
int pos2 = pos; | |
while (1) { | |
if (b[pos2] == '-') { | |
return 0; | |
} else { | |
std::cout << b[pos2]; | |
} | |
pos2++; | |
} | |
} | |
pos++; | |
} | |
} | |
std::string split(std::string string) { | |
int TempNumOne=string.size(); | |
char ret[100]; | |
for (int a=0;a<=TempNumOne;a++) | |
{ | |
ret[a]=string[a]; | |
} | |
return ret; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment