Problem peakfinding
User Yifei1234
Submission Time 2023-03-01 16:18:13
Score 0
Max Time N/A
Max Memory N/A

Compile Error

peakfinding.cpp: In function ‘int main()’:
peakfinding.cpp:9:6: error: expected ‘(’ before ‘int’
9 | for int (x=0;x<n;x++){
| ^~~
| (
peakfinding.cpp:9:11: error: ‘x’ was not declared in this scope
9 | for int (x=0;x<n;x++){
| ^
peakfinding.cpp:11:16: error: expected ‘;’ before ‘peak’
11 | cin>>mountain
| ^
| ;
12 | peak=max(peak,mountain);
| ~~~~
peakfinding.cpp:15:8: error: ‘mountain’ was not declared in this scope
15 | cout<<mountain;
| ^~~~~~~~