Problem sort
User Kenniene
Submission Time 2024-03-28 23:06:02
Score 0
Max Time N/A
Max Memory N/A

Compile Error

sort.cpp: In function ‘int32_t main()’:
sort.cpp:9:11: error: conversion from ‘float’ to ‘long unsigned int’ in a converted constant expression
9 | int a[n];
| ^
sort.cpp:9:11: error: could not convert ‘n’ from ‘float’ to ‘long unsigned int’
sort.cpp:9:11: error: size of array ‘a’ has non-integral type ‘float’
sort.cpp:11:19: error: invalid types ‘float [1][float]’ for array subscript
11 | cin >> a[i];
| ^
sort.cpp:13:15: error: invalid operands of types ‘float [1]’ and ‘float’ to binary ‘operator+’
13 | sort(a, a + n);
| ~ ^ ~
| | |
| | float
| float [1]
sort.cpp:15:20: error: invalid types ‘float [1][float]’ for array subscript
15 | cout << a[i] << " ";
| ^