#include <iostream> #include <stdlib.h> #include <algorithm> #include <conio.h> using namespace std; const int NUM=100; int main () { int data[NUM]; for(int i=0;i<NUM;i++){ data[i]=rand(); } int* max = max_element(data,data+NUM); cout << "RAND_MAX : "<< RAND_MAX << endl;//32767 cout << *max << endl;//たとえば32757 getch(); return 0; }