Quick actions

cmd+k|ctrl+k

Navigation

Languages

83

Snippet info

Language

Cpp

Visibility

public

Author

maloy-

Created

2018-10-31T18:53:54Z

Updated

2018-10-31T18:53:54Z

#include <iostream>
using namespace std;

int main() {
   int max = 0;
   int mass [11];
   for (int i=0; i <= 11 ;i++){
       mass[i] = rand() % 50 ; 
       cout <<(i +1) << " == " <<  mass[i] << endl ; 
   }
   
   int ind;
   
   for (int i = 1; i<=11; i++){
       if (mass[i] > max){
           max = mass[i];
           ind = i;
       }
   }
   cout << "Самый большой елемент =  "<< max << endl ;
   cout << "Он на " << (ind+1) <<"-ном месте " << endl ; 
    return 0;
}
INFO