Problem | lunchbox |
---|---|
User | SheepHeads |
Submission Time | 2023-11-13 09:56:12 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:12:13: error: conversion from ‘double’ to ‘long unsigned int’ in a converted constant expression
12 | double arr[schools];
| ^~~~~~~
lunchbox.cpp:12:13: error: could not convert ‘schools’ from ‘double’ to ‘long unsigned int’
lunchbox.cpp:12:13: error: size of array ‘arr’ has non-integral type ‘double’
lunchbox.cpp:16:8: error: invalid types ‘double [1][double]’ for array subscript
16 | arr[i] = x;
| ^
lunchbox.cpp:20:15: error: invalid operands of types ‘double [1]’ and ‘double’ to binary ‘operator+’
20 | sort(arr, arr+n);
| ~~~^~
| | |
| | double
| double [1]
lunchbox.cpp:25:36: error: invalid types ‘double [1][double]’ for array subscript
25 | lunchbox = lunchbox - arr[counter];
| ^