Write a complete C program that prompts the user to enter a series of integers terminated...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a complete C program that prompts the user to enter a series of integers terminated by a 0. The program should then print positive integer as follows: i) The number of integers entered (not including the 0) ii) The average of the integers (with 1 decimal point of precision) iii) The maximum integer iv) The minimum integer The sample output of this program is shown in Figure 13. Enter a series of integers terminated by a 0: 85 95 75 67 0 You have entered 4 integers. The average is 80.5 The maximum is 95 The minimum is 67 Figure 13 Write a complete C program that prompts the user to enter a series of integers terminated by a 0. The program should then print positive integer as follows: i) The number of integers entered (not including the 0) ii) The average of the integers (with 1 decimal point of precision) iii) The maximum integer iv) The minimum integer The sample output of this program is shown in Figure 13. Enter a series of integers terminated by a 0: 85 95 75 67 0 You have entered 4 integers. The average is 80.5 The maximum is 95 The minimum is 67 Figure 13
Expert Answer:
Answer rating: 100% (QA)
Solution include include int main int numbercount0flag0maxminsum0 taking input printfEnter a series ... View the full answer
Related Book For
Introduction to Java Programming, Comprehensive Version
ISBN: 978-0133761313
10th Edition
Authors: Y. Daniel Liang
Posted Date:
Students also viewed these programming questions
-
can someone solve this Modern workstations typically have memory systems that incorporate two or three levels of caching. Explain why they are designed like this. [4 marks] In order to investigate...
-
You are required to write a Python program that will manage character (heroes and villain) information. Character (hero and villain) information will be stored in a text file that will be read in...
-
Write balanced equations based on the information given. (a) Solid magnesium + oxygen gas solid magnesium oxide (b) Nitrogen monoxide gas + oxygen gas nitrogen dioxide gas (c) Gaseous ethane(C2H6)...
-
What are the advantages offered by starting a business in an accelerator program?
-
I was sure that when our battery hit the market it would be an instant success, said Roger Strong, founder and president of Solar Technology, Inc., but just look at the gusher of red ink for the...
-
Maria Rossi just applied for a bank loan to finance an Italian restaurant she wants to launch. When visiting a banker about a loan application, a question posed to her was if she had results from any...
-
An investor is considering buying some land for $100,000 and constructing an office building on it. Three different buildings are being analyzed. *Resale value to be considered a reduction in cost,...
-
(08 Marks) In the Fig.1(c), compare the output of the network, if the activation function is a sigmoid 1 function y=- and (X1, X2) (1, 1). 1+e 1+1 AYY Y YC.) B YC. ye D 46 (06 Marks)
-
Enter the following sales transaction into the Ledger/Journal. You have negotiated the sale of Mr and Mr Emerald's home at 8 Knowle Court, Ocean Grove for $1,000 000. The purchasers, Mr and Mrs Teal...
-
Burke's Corner currently sells blue jeans and T-shirts. Management is considering adding fleece tops to its inventory to provide a cooler weather option. The tops would sell for $50 each with...
-
Starting from rest, a cart takes \(1.25 \mathrm{~s}\) to slide \(1.80 \mathrm{~m}\) down an inclined low-friction track. What is the angle of incline of the track with respect to the horizontal?
-
Show that the distances traveled by a falling rock in successive 1-s intervals after release are in the ratio \(1: 3: 5: 7 \ldots\).
-
A mouse runs along a baseboard in your house. The mouse's position as a function of time is given by \(x(t)=p t^{2}+q t\), with \(p=0.40 \mathrm{~m} / \mathrm{s}^{2}\) and \(q=-1.20 \mathrm{~m} /...
-
What is the magnitude of the acceleration of a \(65-\mathrm{kg}\) skier moving down a hill that makes a \(45^{\circ}\) angle with the horizontal? Ignore friction.
-
A dragster's position as a function of time is given by \(x(t)=b t^{3 / 2}\), where \(b=30.2 \mathrm{~m} / \mathrm{s}^{3 / 2}\). Calculate the \(x\) component of its velocity at \(1.0 \mathrm{~s}\)...
-
Dewey Corp leases to Hughey Co machinery on January 1, 2021. The book value of the machinery to Dewey Corp was $$450,000. The terms of the lease are seven (7) annual lease payments of $87,500 made at...
-
A firm offers two products for sale. The marginal cost of one product is new zero once the first unit has been produced. The marginal cost of the other product rises as output rises. What would be...
-
Write a program that draws various figures, as shown in Figure 16.36b. The user selects a figure from a radio button and uses a check box to specify whether it is filled. StackPane Ellipse Fill <...
-
Exercise to display all solutions for the Sudoku game, as shown in Figure. When you click the?Solve?button, the program stores all solutions in an?ArrayList. Each element in the list is a...
-
The weighted nine tails problem in the text uses a 3 * 3 matrix. Assume that you have 16 coins placed in a 4 * 4 matrix. Create a new model class named WeightedTailModel16. Create an instance of the...
-
In one cell, gene C is expressed, whereas in another cell, gene C is inactive. After the cells are fused experimentally, both copies of gene C are expressed. This observation could be explained by a....
-
During the process of XCI, which chromosome expresses the Xist gene and which one expresses the Tsix gene? a. Xist is expressed only by Xa, and Tsix is expressed only by Xi. b. Xist is expressed only...
-
A form of chromatin that silences gene expression and varies in location among different types of cells is a. euchromatin. b. constitutive heterochromatin. c. facultative heterochromain. d. Both b...
Study smarter with the SolutionInn App