A librarian charges a fine for books, if returned late. The tariff for the fine is:1-...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
A librarian charges a fine for books, if returned late. The tariff for the fine is:1- 40 paise per day for the first ten days, 2- 60 paise per day for eleven to twenty days, 3-80 paise per day for more than twenty days. This algorithm *.calculates the fine assuming that a book is returned 'N' days late 4. If D<=20 & D>10 then fine-40*10+((D *60), 5.1f D>20 fine =40*D+60*D+((D-20) *80) O 4. If D>10 & D<=20 then fine-40*10+((D-10) *60) 5.If D>20 then fine =40*10+60*10+ ((D-20) *80) 4. If D<=20 then fine=40*10+((D-10) *60) 5.If D>20 fine =40*10+60*10+((D-20) *80) O 4. If D>10 & D<20 then fine=40*10+(D *60), 5. If D>20 fine =40*10+60*10+(D*80) O 4. If D<=20 then fine D*60 5.lf D>20 then fine =D *80 O This algorithm finds and prints the sum and number of positive numbers for * .ten input values of X 4-lf X>0 then (S%=S+X, N=N+1,l=I+1} 5-lf I<10 then go to step 3. O 4-If X>0 then (X=X+S, N=N+1} 5-1If I<=10 then {I=l+1, go to step 3.) O 4-lf X>0 then (S=S+X, N=N+1} 5-lf l=10 then {I=I+1, go to step 3.) 4-lf X>0 then (S=S+X, N=N+1} 5-If I<10 then {I=l+1, go to step 3.} O 4-lf X>0 then (S=S+X} 5-If I<=10 then {I=l+1, N=N+1, go to step 3.) O 4- If I<10 then{S=S+X, N=N+1} 5-If X>0 then{l=l+1, go to step 3.) O A librarian charges a fine for books, if returned late. The tariff for the fine is:1- 40 paise per day for the first ten days, 2- 60 paise per day for eleven to twenty days, 3-80 paise per day for more than twenty days. This algorithm *.calculates the fine assuming that a book is returned 'N' days late 4. If D<=20 & D>10 then fine-40*10+((D *60), 5.1f D>20 fine =40*D+60*D+((D-20) *80) O 4. If D>10 & D<=20 then fine-40*10+((D-10) *60) 5.If D>20 then fine =40*10+60*10+ ((D-20) *80) 4. If D<=20 then fine=40*10+((D-10) *60) 5.If D>20 fine =40*10+60*10+((D-20) *80) O 4. If D>10 & D<20 then fine=40*10+(D *60), 5. If D>20 fine =40*10+60*10+(D*80) O 4. If D<=20 then fine D*60 5.lf D>20 then fine =D *80 O This algorithm finds and prints the sum and number of positive numbers for * .ten input values of X 4-lf X>0 then (S%=S+X, N=N+1,l=I+1} 5-lf I<10 then go to step 3. O 4-If X>0 then (X=X+S, N=N+1} 5-1If I<=10 then {I=l+1, go to step 3.) O 4-lf X>0 then (S=S+X, N=N+1} 5-lf l=10 then {I=I+1, go to step 3.) 4-lf X>0 then (S=S+X, N=N+1} 5-If I<10 then {I=l+1, go to step 3.} O 4-lf X>0 then (S=S+X} 5-If I<=10 then {I=l+1, N=N+1, go to step 3.) O 4- If I<10 then{S=S+X, N=N+1} 5-If X>0 then{l=l+1, go to step 3.) O
Expert Answer:
Answer rating: 100% (QA)
Answer 3 Answer is B 4 If D10 D 20 then fine40106010D2080 Explanation For 4 th step in algorithm in ... View the full answer
Related Book For
Posted Date:
Students also viewed these accounting questions
-
A city librarian claims that books have been checked out an average of seven (or more) times in the last year. You suspect he has exaggerated the checkout rate (book usage) and that the mean number...
-
Is it true that if a firm calculates its days sales outstanding, it has no need for an aging schedule?
-
More than 20 years after Costco opened its first warehouse club store in Seattle, Washington, the companys philosophy can still be summed up as pile em high, price em low. Costco stores are anything...
-
The banker's acceptance and the commercial letter of credit involve four principal parties. Which of the following is not one of those parties? The importer The exporter O The receiving country's...
-
Could a managerial accountant have a motivation to misrepresent data such as direct or indirect material, labor, or other overhead costs? Explain your answer with an example. Compare the motivation...
-
Which of the following is not necessarily true for an operating segment? a. An operating segment earns revenues and incurs expenses. b. The chief operating decision maker regularly reviews an...
-
A randomized-block experiment is run with three treatments and four blocks. The three treatment means are \(\bar{y}_{1}=6, \bar{y}_{2 \bullet}=7\), and \(\bar{y}_{3 \bullet}=11\). The total...
-
Segregation of duties is an important concept in internal control. However, segregation of duties is often a challenge for smaller businesses because they do not have sufficient staff to always...
-
Quirk Corporation issued a 100% stock dividend of its $10 par value common stock. What amount of retained earnings will be capitalized for the additional shares issued?
-
Akha Ama Limited is a specialist manufacturer in the tea and coffee industry. It produces and sells two products: speciality Thai tea and Thai coffee. Akha Ama Limited is a small family-owned...
-
What tool(s) are not used most often as "standard" network monitoring tools? OAP Monitor and Simple Network Management Protocol WLAN Logger and Remote Monitoring All the ones shown in the other...
-
In Problems 51-54, calculate the time necessary to achieve an investment goal. Give your answer to the nearest day. Use a 365-day year \(\$ 5,000\) at \(4.5 \%\) compounded continuously; deposit \(\$...
-
Fig. P1.1 shows the block diagram of a control system. The system in block A has an impulse response \(h_{\mathrm{A}}(t)=e^{-t} u(t)\). The system in block B has an impulse response...
-
Which UML modelling elements can have their behaviour described by a state machine?
-
Why is generalization important to creating reusable components?
-
A manufacturer claims that the tensile strength of a certain composite (in MPa) has the lognormal distribution with \(\mu=5\) and \(\sigma=0.5\). Let \(X\) be the strength of a randomly sampled...
-
21. Calculate the heat energy required to melt 8 kg of ice (Latent heat of fusion 3.34e5 J/kg). A. 2672000 J B. 3376316.722 J C. 1905304.128 J D. 2186520.004 J E. 1422067.935 J Mui.
-
Vince, Inc. has developed and patented a new laser disc reading device that will be marketed internationally. Which of the following factors should Vince consider in pricing the device? I. Quality of...
-
An agricultural producer wishes to insure the value of a crop. Let Q represent the quantity of production in bushels and S the price of a bushel. The insurance payoff is therefore Q(T) V [S(T), T],...
-
An 8-year bond with 6% annual coupons and a 5.004% yield sells for $106.44 with a Macaulay duration of 6.631864. A 9-year bond has 7% annual coupons with a 5.252% yield and sells for $112.29 with a...
-
You have been asked to construct an oil contract that has the following characteristics: The initial cost is zero. Then in each period, the buyer pays S F, with a cap of $21.90 F and a floor of...
-
Natural gas (methane) flows from a 3-in.-diameter gas main, through a 1-in.-diameter pipe, and into the burner of a furnace at a rate of \(100 \mathrm{ft}^{3} /\) hour. Determine the pressure in the...
-
SAE 30 oil at \(60^{\circ} \mathrm{F}\) flows through a 2-in.-diameter pipe with a mean velocity of \(5 \mathrm{ft} / \mathrm{s}\). Determine the value of the Reynolds number (see Example 1.4)....
-
Calculate the Reynolds numbers for the flow of water and for air through a 4-mm-diameter tube, if the mean velocity is \(3 \mathrm{~m} / \mathrm{s}\) and the temperature is \(30^{\circ} \mathrm{C}\)...
Study smarter with the SolutionInn App