Write a sequential C code that reads 4 integers from the user and then prints their...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a sequential C code that reads 4 integers from the user and then prints their average along with how many integers are above average. Sample run1 (green text is user input): Enter 4 integers separated by spaces: 1 2 3 10 There is 1 entry above the average which is 4.0 Sample run2: Enter 4 integers separated by spaces: 247 8 There are 2 entries above the average which is 5.3 (8 marks) Marking Guide: +2 for reading integers, +2 for finding sum and avg, +4 for counting and printing results. Write a sequential C code that reads 4 integers from the user and then prints their average along with how many integers are above average. Sample run1 (green text is user input): Enter 4 integers separated by spaces: 1 2 3 10 There is 1 entry above the average which is 4.0 Sample run2: Enter 4 integers separated by spaces: 247 8 There are 2 entries above the average which is 5.3 (8 marks) Marking Guide: +2 for reading integers, +2 for finding sum and avg, +4 for counting and printing results.
Expert Answer:
Related Book For
Java How To Program Late Objects Version
ISBN: 9780136123712
8th Edition
Authors: Paul Deitel, Deitel & Associates
Posted Date:
Students also viewed these computer network questions
-
Sunland Co. purchased some equipment 3 years ago. The company's required rate of return is 12%, and the net present value of the project was $(1200). Annual cost savings were: $28000 for year 1:...
-
CANMNMM January of this year. (a) Each item will be held in a record. Describe all the data structures that must refer to these records to implement the required functionality. Describe all the...
-
What is a branch delay slot and why does it arise? [7 marks] How can branch delays be avoided? If a processor exhibited one branch delay slot how would you reorder (and possibly modify) the...
-
Through the use of strategic alternatives, companies may compete in a marketplace, achieve its vision, or if no vision has been articulated, decide where it might go and what it might achieve....
-
Find a compound proposition involving the propositional variables p, q, and r that is true when exactly two of p, q, and r are true and is false otherwise.
-
What is the order of magnitude of the de Broglie wavelength of a person walking down the street?
-
Assume that Fireside Inc. purchased \(30 \%\) of the common stock of Theater Supplies Corporation on January 1, 2020 , for \(\$ 100,000\). Fireside Inc. elected to account for its investment using...
-
Suppose that every driver faces a 1% probability of an automobile accident every year. An accident will, on average, cost each driver $10,000. Suppose there are two types of individuals: those with...
-
Explain please 10. Note the following contract specifications: QUOTE INITIAL MAINT CONTRACT UNIT TIC SIZE MOS. UNITS MGN MGN Wheat 5,000 bu c/bushel Mar, May, Jul, $0.01 $1, 250 Sep, Dec $1,375 Gold...
-
In the U . S . , most people's communication style is relatively direct. There is a less of an effort to "guess" what the speaker has not said. This shows that the U . S . mainstream culture is a ( n...
-
On December 31, 2018, Caraboo Corporation issues 5%, 10-year convertible bonds payable with a face value of $1,500,000. The semiannual interest dates are June 30 and December 31. The market interest...
-
Debit Balance 1/1 Credit 21,000 Credits Selected T-accounts of Moore Company are given below for the just completed year: Raw Materials Manufacturing Overhead Debit Credit 210,800 Credits ? ? Debits...
-
The range at which a Bluetooth device can transmit depends on several factors. Understanding the ranges helps you be aware of whether a Bluetooth-enabled device could be the victim of a bluejacking...
-
Required Information [The following Information applies to the questions displayed below.] Manuel Company predicts It will operate at 80% of its productive capacity. Its overhead allocation base is...
-
QS 3-11 Preparing adjusting entries (annual)-depreciation LO4 Jan. 1, 2023 Dec. 31, 2023 Mar. May July Sept. Nov. Jan. Feb. Apr. June Aug. Oct. Dec. 2023 Equipment will last five years (2023-2027) On...
-
A speculator believes that the price of oil will rise during the next seven months. On February 3, 2022, she takes a speculative position in five NYMEX September 2022 Light Sweet Crude Oil futures...
-
Review Exhibit 11.4. Analyze each product on the graph according to the characteristics that influence the rate of adoption. For example, what can you conclude from the data about the relative...
-
Create an app that displays a rectangle with a shadow and allows the user to control the shadow using Sliders. Investigate class DropShadow (package javafx.scene.effect). Use Node method setEffect to...
-
How to get informationabout files and directories on disk. In addition, you used a DirectoryStream to display the contents of a directory. Interface DirectoryStream now contains default method...
-
Our linked-list implementation (Fig. 21.3) used both a firstNode and a lastNode. The lastNode was useful for the insertAtBack and removeFrom- Back methods of the List class. The insertAtBack method...
-
What is meant by alter ego?
-
Find the Internet site "Bob Jensen's Enron Quiz Questions." Take the Quiz.
-
On the Internet, find the SEC Staff Accounting Bulletin No. 101. What are the criteria for determining if revenue is realized or realizable and earned?
Study smarter with the SolutionInn App