Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

i need this in c programming assignment is given and also code is given you just have to code the lines where it says implement

i need this in c programming

assignment is given and also code is given you just have to

code the lines where it says implement code hereimage text in transcribed

image text in transcribed

Exercise 2. (50 points) Finding Minimum and Maximum. In this exercise you will implement a simple C program that finds the minimum and the maximum number from a series of numbers. At the beginning of the program, you will take an integer (n) as an input and run a for loop n times. At each iteration, you will take a floating point number (f) as an input. At the end of the program execution, you will print out the minimum (min) and the maximum (max) number on the standard output screen The block below shows a sample execution of the program where user inputs 10 numbers from 5 to -4 (they can be be arbitrary). The final output minimum and maximum values are displayed at the end. $ ./minmax.c 10 -this is the loop iteration number 4 3 2 -2 -3 -4 The minimum value is: -4.00000 The maximum value is: 5.00000 D untitled | e my-log.c e minmax.c #include 2 #include 3 4 5 6 int main) float x; int n; double sum 0.0 8 9 10 11 /* Read a number from standard input. Execute the loop if it is successful.*/ 12 13 while(scanf("%f %d", &X, &n) 2) /* To exit, press ctrl-D or Ctr-C/ 15 16 17 18 19 *Let the os know everything is just peachy.* 20 21 //Implement your code here return

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions