2664 | 2023-01-18 14:43:41 | Kristóf | Völgy (100 pont) | cpp11 | Compilation error |
#include <iostream>
using namespace std;
int main()
{
int n;
cin>>n;
int k;
int v;
int ut=-1;
int s;
int m[n];
for(int i=0;i<n;i++){
cin>>m[i];
}
for(int i=0;i<n;i++){
s=m[i++];
int se=0;
int sec=0;
int seco=i;
while(se<1){
if(m[i]==s){
se++;
sec++;
}
if(m[seco]>s){
seco++;
s=m[seco+1];
}
else{
se++;
seco++;
s=m[seco+1];
}
}
while(sec<1){
if(m[i]==s){
sec++;
}
if(m[seco]<s){
seco++;
s=m[seco+1];
}
else{
while()
}
}
}
return 0;
}
exit status 1
main.cpp: In function 'int main()':
main.cpp:48:11: error: expected primary-expression before ')' token
48 | while()
| ^
main.cpp:49:5: error: expected primary-expression before '}' token
49 | }
| ^
Exited with error status 1