76 389
Assignments Done
Successfully Done
In May 2019

Answer to Question #8541 in Other Programming & Computer Science for mia ol

Question #8541
Input a list of positive numbers (terminated by 0) into an array, find the largest number in the array, and output the result. Use a subprogram to input the numbers, a function to find the largest number, and a subprogram to output the result.
Expert's answer
On c++:
include <iostream>

using namespace std;

int max_func(int a[n]) {

int max = -9999;

for(int i = 0; i<n; i++){


max = a[i];



return max;


int main() {

int n, arr[];

cout<<"Please, input array size: ";


for(int i = 0; i<n; i++){



cout<<"Max value of this array is: "<<max_func(arr[n]);


return 0;


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions