Question: Need the provided code to print a error message for indistinct variables as stated above and prompt the user the re enter a variable. C

 Need the provided code to print a error message for indistinct

Need the provided code to print a error message for indistinct variables as stated above and prompt the user the re enter a variable. C programming. Simple functions, no arrays. Any other fixes also appreciated

#include #include int main() { int i; float n, value, min = 9999, max = -9999; for (i = 1; i max) { max = value; } }

printf("The maximum is %f and the minimum is %f", max, min); return 0; }

Q3. Write a program that receives 4 distinct real values from a user and finds the maximum and the minimum. If the numbers are not distinct then print an error message saying that the entered values are not distinct and ask the user to input it again. (50) Sample output: (not covered all Inputs scenarios) Enter number 1: 10 Enter number 2: 20 Enter number 3:30.5 Enter number 4:10.5 The maximum is 30.50, The minimum is 10.00

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!