Problem minimum
User DuckyKayden
Submission Time 2026-01-01 13:10:32
Score 0
Max Time N/A
Max Memory N/A

Compile Error

minimum.cpp:4:23: error: ISO C++ forbids declaration of ‘findMin’ with no type [-fpermissive]
4 | findMin(int n, int a[]) {
| ^
minimum.cpp: In function ‘int findMin(int, int*)’:
minimum.cpp:5:2: error: ‘small’ was not declared in this scope
5 | small = a[0]
| ^~~~~
minimum.cpp:6:17: error: ‘i’ was not declared in this scope
6 | for(int i = 0; i < n; i++) {
| ^
minimum.cpp:9:12: error: a function-definition is not allowed here before ‘{’ token
9 | int main() {
| ^
minimum.cpp:12:1: error: expected ‘}’ at end of input
12 | }
| ^
minimum.cpp:4:25: note: to match this ‘{’
4 | findMin(int n, int a[]) {
| ^