Answer:
#include <iostream>
using namespace std;
double larger( double x, double y){
if (x > y){
return x;
} else{
return y;
}
}
int main(){
int n, max = 0;
for (int i =0; i < 15; i++){
cout<< "Enter item"<< i+1 << ": ";
cin>> n;
cout<< "\\";
max = larger( n, max);
}
cout<<"The maximum number is: "<< max;
return 0;
}
Step-by-step explanation:
The C++ program defines the function 'larger' that compares and returns the largest of two numbers. The main program prompts the user for 15 numbers and the larger function is called to return the largest of the fifteen numbers given.