7136 | 2023-12-31 12:11:08 | Kristóf | Hús sütés (75 pont) | cpp17 | Compilation error |
#include <iostream>
using namespace std;
int main()
{
int n;
cin>>n;
int volgy[n];
for(int i=0;i<n;i++){
cin>>volgy[i];
}
int nagy=0;
int nagysz=0;
int kicsi=10000000;
int ered=0;
int ans=0;
for(int i=0;i<n;i++){
volgy[i]=volgy[i]+i;
}
for(int i=0;i<n;i++){
if(nagy<volgy[i]){
nagy=volgy[i];
}
cout<<nagy;
return 0;
}
exit status 1
main.cpp: In function 'int main()':
main.cpp:37:2: error: expected '}' at end of input
37 | }
| ^
main.cpp:6:1: note: to match this '{'
6 | {
| ^
Exited with error status 1