Question: I need the answer very quickly HW3-E Smallest element larger than specific value (Chapter 7) Collapse context In this question you are asked to read

I need the answer very quickly

HW3-E Smallest element larger than specific value (Chapter 7)

Collapse context

In this question you are asked to read a 10-elements one dimensional array from the user and find the smallest element larger than the value stodred at index 0. If the value storded at index 0 is the largest element in the array then you should print Invalid

IMPORTANT NOTE

  • Do not add any cout statements except for the final answers as specified above.
  • Do not add "Enter a number", "the number of digits is" or any similar prompts.
  • Also note that the automatic grader is case-sensitive; so "INVALID" is wrong but "Invalid" is correct.
  • Do not add any unnecessary spaces inside the strings of cout statements " " unless we ask you to.
  • You may add any libraries needed.

I/O

Program Input:

  • one line that contains the 10 values of the array.

Program Output:

  • One line that contains the smallest value in the array larger than the value stored at index 0 or Invalid

#include using namespace std;

int main() {

return 0;

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!