Question: Can you help write this in C language DEV compiler because I'm using it. thanks. Write a program that reads multiple integers from the user

 Can you help write this in C language DEV compiler because

Can you help write this in C language DEV compiler because I'm using it. thanks.

Write a program that reads multiple integers from the user and finds the two largest values. The program ignores negative values and prints a message indicating so. The sentinel is -1. If the largest value or the second largest value occur multiple times, they are counted counted once, as in the sample below. If no valid input was entered, or only one valid input was entered the program should print a message indicating so. Use a flag variable that could be (0, 1, 2) to indicate that no input was entered so far, one valid input was entered so far, or two or more valid input were entered so far. Enter integer: 3 Enter integer: -12 >>> Invalid input! Enter integer: 40 Enter integer: 12 Enter integer: 40 Enter integer: 30 Enter integer: -1 The two largest values are: 30 and 40. Enter integer: -15 >>> Invalid input! Enter integer: -12 >>> Invalid input! Enter integer: 6 Enter integer: -1 Only one valid value was entered: 6

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!