Question
Write a program in C++ that asks the user to enter an array of size N and find index of the largest value in that
Write a program in C++ that asks the user to enter an array of size N and find index of the largest value in that array using a function named largest_location that takes an array of integer values and an integer that tells how many integer values are in the array as arguments. The function should return as its value the index of the cell containing the largest of the values in the array. Do not forget to write the main function as well. Your main function should get the array from the user and pass it to the function largest_location. Print the index of the largest location in the main function.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started