Asked by Bill
                Write a program which finds the age and name of the oldest person in a group. 
const int SIZE = 8;
int age[SIZE] = { 21, 42, 26, 22, 35, 13, 18, 39 };
string name[SIZE] = {“Mark”, “Rebecca”, “Fred”, “Alfred”, “Waldo”, ”Sue”, “Mary”, “Darrin”};
You must use the computer to write this program. You must use arrays and functions to write this program.
Note: The data should not be able to be changed inside the function.
            
            
        const int SIZE = 8;
int age[SIZE] = { 21, 42, 26, 22, 35, 13, 18, 39 };
string name[SIZE] = {“Mark”, “Rebecca”, “Fred”, “Alfred”, “Waldo”, ”Sue”, “Mary”, “Darrin”};
You must use the computer to write this program. You must use arrays and functions to write this program.
Note: The data should not be able to be changed inside the function.
Answers
                    Answered by
            oobleck
            
    go online. whatever you are trying to do, someone has already done it and posted the code.
just write a loop that traverses the array, saving the index of biggest value so far.
Presumably, you will also need to display the person and age found.
    
just write a loop that traverses the array, saving the index of biggest value so far.
Presumably, you will also need to display the person and age found.
                                                    There are no AI answers yet. The ability to request AI answers is coming soon!
                                            
                Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.