Skip to content

Commit 6921ce2

Browse files
committed
basics 2
1 parent c74ffc2 commit 6921ce2

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

SPOJ/Basics/Half_of_the_half.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#include <iostream>
2+
#include <string>
3+
using namespace std;
4+
int main()
5+
{
6+
int t;
7+
cin>>t;
8+
while(t--){
9+
string seq;
10+
cin>>seq;
11+
int l=(seq.length()/2);
12+
for(int i=0;i<l;i+=2){
13+
cout<<seq.substr(i,1);
14+
}
15+
cout<<endl;
16+
}
17+
}

0 commit comments

Comments
 (0)