Problem badcontest
User Red123
Submission Time 2026-01-28 16:13:15
Score 0
Max Time N/A
Max Memory N/A

Compile Error

badcontest.cpp: In function ‘int main()’:
badcontest.cpp:8:10: error: conversion from ‘float’ to ‘long unsigned int’ in a converted constant expression
8 | int arr[n];
| ^
badcontest.cpp:8:10: error: could not convert ‘n’ from ‘float’ to ‘long unsigned int’
badcontest.cpp:8:10: error: size of array ‘arr’ has non-integral type ‘float’
badcontest.cpp:9:10: error: conversion from ‘float’ to ‘long unsigned int’ in a converted constant expression
9 | int brr[n];
| ^
badcontest.cpp:9:10: error: could not convert ‘n’ from ‘float’ to ‘long unsigned int’
badcontest.cpp:9:10: error: size of array ‘brr’ has non-integral type ‘float’
badcontest.cpp:14:15: error: invalid types ‘float [1][float]’ for array subscript
14 | cin >> arr[i];
| ^
badcontest.cpp:15:13: error: invalid types ‘float [1][float]’ for array subscript
15 | a += arr[i];
| ^
badcontest.cpp: