Problem lunchbox
User senkyte
Submission Time 2024-02-14 08:15:41
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:8:2: error: ‘array’ was not declared in this scope
8 | array n[];
| ^~~~~
lunchbox.cpp:2:1: note: ‘std::array’ is defined in header ‘<array>’; did you forget to ‘#include <array>’?
1 | #include <iostream>
+++ |+#include <array>
2 | using namespace std;
lunchbox.cpp:10:10: error: ‘n’ was not declared in this scope
10 | cin >> n[i];
| ^
lunchbox.cpp:14:6: error: ‘n’ was not declared in this scope
14 | if(n[count] > n[count + 1]){
| ^
lunchbox.cpp:17:3: error: expected ‘}’ before ‘else’
17 | else{
| ^~~~
lunchbox.cpp:14:30: note: to match this ‘{’
14 | if(n[count] > n[count + 1]){
| ^
lunchbox.cpp: At global scope:
lunchbox.cpp:22:1: error: expected declaration before ‘}’ token
22 | }
| ^