Problem | missingnumber |
---|---|
User | ZacharyTan2010 |
Submission Time | 2024-02-21 16:26:50 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
missingnumber.cpp:4:5: error: cannot declare ‘::main’ to be a global variable
4 | int main{
| ^~~~
missingnumber.cpp:5:1: error: expected primary-expression before ‘long’
5 | long t,s,n,a;cin>>n;
| ^~~~
missingnumber.cpp:5:1: error: expected ‘}’ before ‘long’
missingnumber.cpp:4:9: note: to match this ‘{’
4 | int main{
| ^
missingnumber.cpp:5:14: error: ‘cin’ does not name a type
5 | long t,s,n,a;cin>>n;
| ^~~
missingnumber.cpp:6:2: error: expected unqualified-id before ‘for’
6 | for(int i=1;i<n;i++){cin>>a;s+=a;}
| ^~~
missingnumber.cpp:6:14: error: ‘i’ does not name a type
6 | for(int i=1;i<n;i++){cin>>a;s+=a;}
| ^
missingnumber.cpp:6:18: error: ‘i’ does not name a type
6 | for(int i=1;i<n;i++){cin>>a;s+=a;}
| ^
missingnumber.cpp:7:2: error: ‘t’ does not