Created
October 31, 2018 07:07
-
-
Save feynon/29b12d904df6f3e652e830bb1dc6b850 to your computer and use it in GitHub Desktop.
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