Write a program in C++ to scan three integers and display the biggest number

Write a program in C++ to scan three integers and display the biggest number
 # include <iostream>
#include <algorithm>
using namespace std;
int main(){
       int a[3], b;
       for (int i = 0; i < 3; i++){
              cout << "Enter Number Please" << endl;
              cin >> b;
              a[i] = b;
       }
       cout << "The Bigest Number is" << (*max_element(a, a + 3)) << endl;
       system("pause");
       return 0;

}

Comments