Created
October 31, 2018 07:04
-
-
Save feynon/6e8133f6e864075de885e02261661631 to your computer and use it in GitHub Desktop.
HalfOfHalf
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
/* | |
Input: | |
4 | |
your | |
progress | |
is | |
noticeable | |
Output: | |
y | |
po | |
i | |
ntc | |
*/ | |
#include <iostream> | |
#include <string.h> | |
using namespace std; | |
int main() | |
{ | |
int n,k,i=0; | |
cin >> n; | |
while(n--) | |
{ | |
string s; | |
cin >> s; | |
k=s.length()/2; | |
while(i<k) | |
{ | |
cout << s[i]; | |
i=i+2; | |
} | |
cout << endl; | |
i=0; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment