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<< "\n";
max = larger( n, max);
}
cout<<"The maximum number is: "<< max;
return 0;
}
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.
Answer:
input Devices, Processing Devices, Output Devices, Memory/Storage Devices
Explanation:
I don't think they are illegal, though you might get in trouble by administration