Problem missingnumber
User Hijackedsoul
Submission Time 2024-01-08 12:38:32
Score 0
Max Time N/A
Max Memory N/A

Compile Error

missingnumber.cpp: In function ‘int main()’:
missingnumber.cpp:7:15: error: expected ‘;’ before ‘for’
7 | ans=n*(n-1)/2
| ^
| ;
8 | for(int i=0; i<n-1; i++){
| ~~~
missingnumber.cpp:8:15: error: ‘i’ was not declared in this scope
8 | for(int i=0; i<n-1; i++){
| ^