arrow_forward
همه ارسالها
جزئیات ارسال کد#418
برای پسندیدن وارد شوید
1#include <iostream>
2using namespace std;
3int main()
4{
5 int n;
6 cin >> n;
7 int arr[n];
8
9 for ( int i = 0 ; i < n ; i ++ )
10 {
11 cin >> arr[i];
12 }
13
14 int min = arr[0];
15 int y = 0;
16 for ( int x = 1 ; x < n ; x ++ )
17 {
18 if ( arr[x] < min )
19 {
20 min = arr[x];
21 y = x;
22 }
23 }
24
25 cout << y;
26
27 return 0;
28}
کد ارسالشده برای داوری خودکار هاتکدز
UTF-8