Submission #206649

#TimeUsernameProblemLanguageResultExecution timeMemory
206649mayhoubsalehSplit (info1cup19_split)C++14
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; string s; int main(){ cin>>s; for(int i=0;i<s.size()/2;i++){ cout<<s[i]; } cout<<' ': for(int i=s.size()/2;i<s.size();i++)cout<<s[i];cout<<endl; }

Compilation message (stderr)

split.cpp: In function 'int main()':
split.cpp:7:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(int i=0;i<s.size()/2;i++){
               ~^~~~~~~~~~~
split.cpp:10:12: error: expected ';' before ':' token
   cout<<' ':
            ^
split.cpp:11:24: error: 'i' was not declared in this scope
   for(int i=s.size()/2;i<s.size();i++)cout<<s[i];cout<<endl;
                        ^