A number expressed in scientific notation is represented by its mantissa (a fraction) and its exponent...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
A number expressed in scientific notation is represented by its mantissa (a fraction) and its exponent (an integer). 1. Define a type sci_not_t that has separate components for these two parts. 2. Define a function scan_sci that takes from the input source a string representing a positive number in scientific notation, and breaks it into components for storage in a sci_not_t structure. 3. The mantissa of an input value (m) should satisfy this condition: 0.1 <= m < 1.0. 4. Write functions to compute the sum, difference, product, and quotient of two sci_not_t values. All these functions should have a result type of sci_not_t and should ensure that the result's mantissa is in the prescribed range. 5. Define a print sci function to display the function results in scientific notation. 6. Create a driver program to test your functions. Your output should be of this form: Values input: 0.25000e3 0.20000e1 Sum: 0.25200e3 Difference: 0.24800e3 Product: 0.50000e3 Quotient: 0.12500e3 A number expressed in scientific notation is represented by its mantissa (a fraction) and its exponent (an integer). 1. Define a type sci_not_t that has separate components for these two parts. 2. Define a function scan_sci that takes from the input source a string representing a positive number in scientific notation, and breaks it into components for storage in a sci_not_t structure. 3. The mantissa of an input value (m) should satisfy this condition: 0.1 <= m < 1.0. 4. Write functions to compute the sum, difference, product, and quotient of two sci_not_t values. All these functions should have a result type of sci_not_t and should ensure that the result's mantissa is in the prescribed range. 5. Define a print sci function to display the function results in scientific notation. 6. Create a driver program to test your functions. Your output should be of this form: Values input: 0.25000e3 0.20000e1 Sum: 0.25200e3 Difference: 0.24800e3 Product: 0.50000e3 Quotient: 0.12500e3
Expert Answer:
Answer rating: 100% (QA)
include Defining type scinott typedef struct double mantissa int exponent scinott Defining scansci s... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
You are the Chairperson of the Business Program at InterState Community College (ICC). Recently it has come to that attention of ICC Administration that there is a need for Project Management...
-
Only one of three balls A, B, and C carries a net charge q. The balls are made from conducting material and are identical. One of the uncharged balls can become charged by touching it to the charged...
-
you created a program named Triangle in which you displayed a seven-line triangle pattern like the one in Figure 6-33 by using a series of println() statements. Now, using your knowledge of loops,...
-
Guido is calculating his personal income tax. He has the following expenses, and wants to know what he can claim on his tax return. The following expenses are all related to Guido's personal...
-
Turn back to Figure, which lists prices of various IBM options. Use the data in the figure to calculate the payoff and the profits for investments in each of the following January expiration options,...
-
Suggest a logical basis for allocating these indirect expenses: housekeeping services; office equipment repairs; general institutional advertising.
-
What the paralegals role is in discovery?
-
Enterprise Industries produces Fresh, a brand of liquid laundry detergent. In order to study the relationship between price and demand for the large bottle of Fresh, the company has gathered data...
-
Sharon Industries has the following amounts budgeted for selling and administrative expenses for February: Advertising $85900 Utilities 56800 Office equipment depreciation 14800 Bad debts 7000...
-
Excel worksheets to use for journal entries and t-accounts and also utilize Excel for trial balances and financial statements. Students are to complete journal entries for each month, including...
-
[The reactionA->Bis to be carried out isothermally in a continuous-flow reactor. The entering volumetric flow rate v0 is 10 dm^3/h. (Note: F A =C A * v. For a constant volumetric flow rate v=v0,...
-
A reverse osmosis membrane unit concentrates a liquid food from 10 to 20% total solids by selectively removing water. If 100 lb/hr of feed is input to the membrane, how much concentrated product is...
-
Q.1 A Business Continuity management should cover: Select the correct option(s) and click Submit Animal-Caused Events Human-Caused Events Natural Disasters Technological Accidents Submit
-
8. Show that a term structure model with flat yield curves and parallel yield curve shifts contains arbitrage opportunities using the following model: At time 0 the yield curve is flat at 8%. At time...
-
Luzadis Company makes furniture using the latest automated technology. The company uses a job - order costing system and applies manufacturing overhead cost to products on the basis of machine -...
-
Find the inverse of the matrix (if it exists). (If an answer does not exist, enter DNE.) 23/3 5/8 [] -2 1/4 Need Help? Read It
-
From the perspective of someone using aggregate-demand and aggregate supply analysis, what is the impact of a tax cut when the economy is operating above full employment. Is this a wise policy? Why...
-
According to a New York Times columnist, The estate tax affects a surprisingly small number of people. In 2003, . . . just 1.25 percent of all deaths resulted in taxable estates, with most of them...
-
During 2012, Palo Fiero purchases the following property for use in his manufacturing business: Palo uses the accelerated depreciation method under MACRS, if available, and does not make the election...
-
Skyler is covered by his company's health insurance plan. The health insurance costs his company $3,500 a year. During the year, Skyler is diagnosed with a serious illness and the health insurance...
-
Frank, age 35, and Joyce, age 34, are married and file a joint income tax return for 2012. Their salaries for the year total $83,000 and they have taxable interest income of $4,000. They have no...
-
Restore the file Boston Catering. Make the following adjustments and then print an income statement and balance sheet for the period 7/1/10 through 9/30/10 setting the columns to Month so that you...
-
Explain the journal entry method of recording end-of-period adjustments.
-
Give an example of an accrued expense other than the example given in this chapter. Explain how your example of accrued expense would be adjusted using journal entries.
Study smarter with the SolutionInn App