Problem bronzemedal
User shashi93
Submission Time 2025-08-22 15:20:31
Score 0
Max Time N/A
Max Memory N/A

Compile Error

bronzemedal.cpp: In function ‘int main()’:
bronzemedal.cpp:12:13: error: conversion from ‘long double’ to ‘long unsigned int’ in a converted constant expression
12 | int arr[n];
| ^
bronzemedal.cpp:12:13: error: could not convert ‘n’ from ‘long double’ to ‘long unsigned int’
bronzemedal.cpp:12:13: error: size of array ‘arr’ has non-integral type ‘long double’
bronzemedal.cpp:14:21: error: invalid types ‘long double [1][long double]’ for array subscript
14 | cin >> arr[i];
| ^
bronzemedal.cpp:16:18: error: invalid operands of types ‘long double [1]’ and ‘long double’ to binary ‘operator+’
16 | sort(arr, arr+n, greater<int>());
| ~~~^~
| | |
| | long double
| long double [1]
bronzemedal.cpp:21:22: error: invalid types ‘long double [1][long double]’ for array subscript
21 |