Submission #206649

# Submission time Handle Problem Language Result Execution time Memory
206649 2020-03-04T11:11:10 Z mayhoubsaleh Split (info1cup19_split) C++14
Compilation error
0 ms 0 KB
#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

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;
                        ^