Compile Error
foo.cc: In function 'int main()': foo.cc:12:36: error: expected primary-expression before ':' token 12 | cout<<"Game #"<<i<<:<<x<<"/"<<y<<endl; | ^ foo.cc:14:2: error: expected '}' at end of input 14 | } | ^ foo.cc:6:1: note: to match this '{' 6 | { | ^
Code
#include <iostream>
using namespace std;
int main()
{
int n;
cin>>n;
for(int i=1; i<=n; i++){
int x,y;
cin>>x>>y;
cout<<"Game #"<<i<<:<<x<<"/"<<y<<endl;
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1001 Achievement-Unlocked
- Language
- C++17 (G++ 13.2.0)
- Submit At
- 2025-01-30 15:26:52
- Judged At
- 2025-01-30 15:26:52
- Judged By
- Score
- 0
- Total Time
- 0ms
- Peak Memory
- 0 Bytes