/ SeriousOJ /

Record Detail

Compile Error

foo.cc:3:5: error: cannot declare '::main' to be a global variable
    3 | int main
      |     ^~~~
foo.cc:5:3: error: expected primary-expression before 'int'
    5 |   int a,b,c;
      |   ^~~
foo.cc:5:3: error: expected '}' before 'int'
foo.cc:4:1: note: to match this '{'
    4 | {
      | ^
foo.cc:6:3: error: 'cin' does not name a type
    6 |   cin>>a>>b>>c;
      |   ^~~
foo.cc:7:3: error: expected unqualified-id before 'if'
    7 |   if(a<b && a<c)
      |   ^~
foo.cc:11:3: error: expected unqualified-id before 'else'
   11 |   else if(b<a && b<c)
      |   ^~~~
foo.cc:15:3: error: expected unqualified-id before 'else'
   15 |   else
      |   ^~~~
foo.cc:19:1: error: expected declaration before '}' token
   19 | }
      | ^

Code

#include<bits/stdc++.h>
using namespace std;
int main
{ 
  int a,b,c;
  cin>>a>>b>>c;
  if(a<b && a<c)
  {
     cout<<"mojo";
  }
  else if(b<a && b<c)
 {  
     cout<<"3vai";
 }
  else
 {
     cout<<"7vai";
 }
}

Information

Submit By
Type
Submission
Problem
P1179 7vai , 3vai or mojo ?
Language
C++17 (G++ 13.2.0)
Submit At
2025-09-01 14:43:57
Judged At
2025-09-01 14:43:57
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes