Write a C program, which takes an interval from the user and then calculates the average...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a C program, which takes an interval from the user and then calculates the average of all the even numbers from the given interval and converts the result into hexadecimal. The program needs to display the average in decimal form (numerically and textual) and in hexadecimal form(numerically). Instruction for the user: "Give the interval (lower, upper):' Scores: criteria check --> 10 calculate the average --> 15 conversion to hexadecimal --> 15 conversion to text --> 10 For example: Input Result Give the interval (lower, upper): 1,30 15 five one F Give the interval (lower, upper): 210,299 254 two five four FE Give the interval (lower, upper): -15,190 88 eight eight 58 Write a C program, which takes an interval from the user and then calculates the average of all the even numbers from the given interval and converts the result into hexadecimal. The program needs to display the average in decimal form (numerically and textual) and in hexadecimal form(numerically). Instruction for the user: "Give the interval (lower, upper):' Scores: criteria check --> 10 calculate the average --> 15 conversion to hexadecimal --> 15 conversion to text --> 10 For example: Input Result Give the interval (lower, upper): 1,30 15 five one F Give the interval (lower, upper): 210,299 254 two five four FE Give the interval (lower, upper): -15,190 88 eight eight 58
Expert Answer:
Related Book For
Data Structures and Algorithms in Java
ISBN: 978-1118771334
6th edition
Authors: Michael T. Goodrich, Roberto Tamassia, Michael H. Goldwasser
Posted Date:
Students also viewed these accounting questions
-
Write a C program for this problem: FoodPanda delivery service wants to appraise their riders by adding increments to the basic salaries . The amount of increment depends upon the feedback points...
-
Write a C program called reservations.c that simulates some people trying to reserve seats at a restaurant for dinner. The program MUST work as follows: The restaurant takes reservations anywhere...
-
Write code to read a line of input from the user and print the words of that line in sorted order, without removing duplicates. For example, the program output might look like the following: Type a...
-
On 1 June 1998, Alice bought a house in Derby for 45,000. - She occupied the house as her PPR until 1 May 2000 when she left to work in Exeter, living in rented accommodation. - She returned to the...
-
What is a U.S. Treasury Strip?
-
What are the forms of identification that establish identity for the I-9 for employees over the age of 25? 1. State-issued drivers license 2. U.S. passport 3. School record 4. Certified copy of the...
-
The plot below is voltage and current from the output of a VFD. What can you see in the voltage traces that defines them as a VFD source? Current (A) 200 100 0.073 -100 -200 820 0.079 0.089 2800...
-
Effects of Stockholders Equity Transactions on Statement of Cash Flows Refer to all of the facts in Problem 11-1. Required Indicate how each transaction affects the cash flow of Peeler Company by...
-
A conducting sphere of 4.0 cm radius has a cavity of 1.0 cm radius (sharing the same center). The conducting sphere has a total charge of + 15 nC. In addition, a - 12.0 nC point charge is located at...
-
WorldCom revealed that in addition to the US$3.8bn in expenses improperly recorded as capital, an internal audit discovered that US$3.3bn in profits were improperly recorded on its books from 1999 to...
-
Keilantra finds some nickels and quarters under the couch cushions. How many coins does she have if she has 11 nickels and 4 quarters? How many coins does she have if she has x nickels and y quarters?
-
True-False A plaintiff can select any court in which to file a complaint.
-
Your firms client, Arnold, attended a graduation party hosted by an acquaintance of his, Steven. Stevens parents, at Stevens request, agreed to stay out of sight of his guests and they were not seen...
-
Your firm has recently accepted Maria Conseulas as a client. Maria was seriously injured when she fell off a horse while jumping it at a horse show. The horse caught its foot when going over a...
-
Your firm has agreed to represent Scott, an insured of XYZ Insurance Company. Scott was sued by a person injured in an automobile accident that Scott was responsible for. Scotts policy limits were...
-
What determines the time limits of oral arguments? Must a judge allow them?
-
39. What is the biggest problem of using government actions such as taxes and emission charges to control external costs? a. insufficient legal power to enforce the controls b. obtaining enough data...
-
For the following exercises, find the area of the triangle. Round to the nearest hundredth. 22 50 36
-
Design and implement a version of the bucket-sort algorithm for sorting a list of n entries with integer keys taken from the range [0,N 1], for N 2. The algorithm should run in O(n+N) time.
-
Prove that an n-entry multiway search tree has n+1 external nodes.
-
The quadratic probing strategy has a clustering problem related to the way it looks for open slots. Namely, when a collision occurs at bucket h(k), it checks buckets A[(h(k)+i 2 ) mod N], for i =...
-
The trial balance of Mumbai Co. at 31 December was as follows: The following information is applicable. (a) Inventory on 31 December is 850,000. (b) The cumulative allowance for doubtful debts is to...
-
The trial balance of Penang Co. on 31 July 20X7 was as follows. The following additional information is available: 1. Inventory at 31 July 20X6 is valued at 1,361,000. 2. Depreciation for the year is...
-
The trial balance of Shanghai Co. on 31 March 20X7 is given below. The following information is also relevant: 1. Closing inventory is valued at 133m. 2. Electricity accrued is estimated to be 5m. 3....
Study smarter with the SolutionInn App