Compile Error

foo.cc:4:1: error: expected initializer before 'int'
    4 | int n;
      | ^~~
foo.cc:5:1: error: 'cin' does not name a type
    5 | cin>>n;
      | ^~~
foo.cc:6:1: error: expected unqualified-id before 'if'
    6 | if(n%5==0&&n%3==0&&n%7==0)
      | ^~
foo.cc:10:1: error: expected unqualified-id before 'else'
   10 | else if(n%3==0&&n%5==0)
      | ^~~~
foo.cc:14:1: error: expected unqualified-id before 'else'
   14 | else if(n%3==0&&n%7==0)
      | ^~~~
foo.cc:18:1: error: expected unqualified-id before 'else'
   18 | else if(n%5==0&&n%7==0)
      | ^~~~
foo.cc:22:1: error: expected unqualified-id before 'else'
   22 | else if(n%5==0)
      | ^~~~
foo.cc:26:1: error: expected unqualified-id before 'else'
   26 | else if(n%3==0)
      | ^~~~
foo.cc:30:1: error: expected unqualified-id before 'else'
   30 | else if(n%7==0)
      | ^~~~
foo.cc:34:1: error: expected unqualified-id before 'else'
   34 | else
      | ^~~~
foo.cc:38:1: error: expected unqualified-id before 'return'
   38 | return 0;
      | ^~~~~~
foo.cc:39:1: error: expected declaration before '}' token
   39 | }
      | ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1703 判断能否被3,5,7整除
语言
C++
递交时间
2023-07-23 19:20:50
评测时间
2023-07-23 19:20:50
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes