1
I need to create a program where give the lowest value and tell what position you are in, example
input: 4
5,4,3,1
exit:
lower value : 1
position: 4
so far my code is like this and I have no idea how to continue
#include <iostream>
using namespace std;
int main() {
int n,i,menor ;
cin >> n;
int a[n];
for (int i = 0; i< n; i++){
cin >> a[i];
}
for(int i=0; i<n ;i++){
if(a[i]<menor){
menor=a[i];
}
}
cout << menor << endl;
return 0;
}