Write a C program that has as input a telegram text and as output the cost...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a C program that has as input a telegram text and as output the cost of this telegram. The input consists of one or more lines containing a number of words each separated by a number of spaces. The unique word "END" terminates the input. Produce a bill for this telegram with each word costing 10 cents and an additional charge of 5 cents for every word over eight letters long. For instance for the following text "Violence can only stop if we undertake to preach and practice peace and compassion If only the rulers of this world could embrace peace and Justice Science and Engineering are ready to create paradise on earth END" The output will be the following: Number of words Number of normal sized words Number of oversized words TOTAL : 37 : 34 at 10 is 3.40 3 at 15 is 0.45. 3.85 Write a C program that has as input a telegram text and as output the cost of this telegram. The input consists of one or more lines containing a number of words each separated by a number of spaces. The unique word "END" terminates the input. Produce a bill for this telegram with each word costing 10 cents and an additional charge of 5 cents for every word over eight letters long. For instance for the following text "Violence can only stop if we undertake to preach and practice peace and compassion If only the rulers of this world could embrace peace and Justice Science and Engineering are ready to create paradise on earth END" The output will be the following: Number of words Number of normal sized words Number of oversized words TOTAL : 37 : 34 at 10 is 3.40 3 at 15 is 0.45. 3.85
Expert Answer:
Related Book For
Posted Date:
Students also viewed these programming questions
-
In this question assume that p and q are atomic formulae. (a) Compare and contrast path formulae and state formulae in temporal logic. [4 marks] (b) Describe and contrast the meanings of F(G p) and...
-
Beck Manufacturing reports the following information in T-account form for 2019. The following data is provided for Garcon Company and Pepper Company. Garcon Company Pepper Company Beginning finished...
-
The truss shown consists of six members and is supported by a ball and socket at B, a short link at C, and two short links at D. Determine the force in each of the members for P = (-2184 N)j and Q =...
-
A small oil company, Hastelloy, uses micro - moving Coriolis axle gauges on its construction site. Emerson wants to replace it with F series axle meters. This replacement process will apply to the...
-
With reference to Exercise 11.16, fit a straight line to the data by the method of least squares, using \(M_{\text {ext }}\) as the independent variable, and draw its graph on the diagram obtained in...
-
Partially completed budget performance reports for Maguire Company, a manufacturer of air conditioners, are provided on the shown below . a. Complete the budget performance reports by determining the...
-
Does your organization utilize self-service portals? How do you use self-service portals? If you do not have experience using self-service portals, which portals would you recommend for your...
-
RZNY, LP., is a calendar-year, cash-basis limited partnership. Marc Liu, an individual, owns a 55% interest in RZNY as a general partner. During Year 1, RZNY had the following results: 1. Sales -...
-
Mr. Lee was employed by a travel company as a travel consultant. Since June 2012, he had touched the hair of his colleague, Miss Liu, who was suffering from congenital speech and hearing...
-
The federal Energy Information Administration estimates that nearly 95% of all new power capacity installed in the United States in 2017 came from renewables. These are natural resources that are not...
-
The market for toys during the holiday season is intensely competitive. Before the 2018 holiday season, Toys R Us and the Bon-Ton department store chain had closed, and Sears had closed many of its...
-
Boeing is back at the drawing board. In 2015, after releasing the Boeing 777X, an update to the widely popular 777, they announced plans to redevelop their production process. Boeing hoped to extend...
-
During the year ended 30 June 2019, the directors of Jindabyne Ltd declared and paid an interim dividend of $18 000 out of retained earnings. At the end of the year the financial statements showed a...
-
Which of the following industries do you expect to have high concentration ratios: automobile production, aircraft manufacture, computer and electronics production, pharmaceuticals, production of...
-
A sample of size 9 from a normal distribution with 2 = 25 is used to test H0: = 20 H1: = 28 The test statistic used is the sample mean,X bar. Let us agree to reject H0 in favor of H1 if the...
-
In Exercises 15 through 30, find the derivative dy/dx. In some of these problems, you may need to use implicit differentiation or logarithmic differentiation. y ex + et -2x 1 + e
-
1. Describe the capital budgeting process in your own words. 2. Define capital investment. List at least three examples of capital investments other than the examples provided in the chapter. 3. As...
-
AllTreads produces two types of exercise treadmills: Regular and Deluxe. The exercise craze is such that AllTreads could use all of its available machine hours producing either model. The two models...
-
Carmichael Industries is in the process of analyzing its manufacturing overhead costs. Carmichael Industries is not sure if the number of units produced or the number of direct labor (DL) hours is...
-
Define and distinguish between an open and a closed adoption.
-
Describe the nature and purpose of putative father registries.
-
Describe the nature and significance of the biologyplus rule.
Study smarter with the SolutionInn App