subject
Engineering, 22.04.2020 02:29 alimfelipe

// This program accepts data about 100 books and// determines a price for each.// The price is 10 cents per page for the// first 200 pages, then 8 cents// per page after that.// After pricing, all the data is displayed.// Create a Book class and modify the program to use// an array of Book objects instead of individual// data items. startDeclarationsnum SIZE = 100num substring titles[SIZE]num pages[SIZE]num prices[SIZE]num MIN_PAGES = 200num HIGH_PRICE = 0.10num LOW_PRICE = 0.08sub = 0while sub < SIZEoutput "Enter title "input title[sub]output "Enter pages "input pages[sub]if pages[sub] <= MIN_PAGES thenprice[sub] = pages[sub] * HIGH_PRICEelseprice[sub] = MIN_PAGES * HIGH_PRICE +(pages[sub] MIN_PAGES) * LOW_(titles, pages, prices, SIZE)stopvoid displayBooks(string[] titles, num[] pages, num[] prices, num SIZE)Declarationsint xx = 0while x < SIZEoutput "Title: ", titles[x]output "Pages: ", pages[x]output "Price: ", prices[x]x = x + 1endwhilereturn

ansver
Answers: 2

Other questions on the subject: Engineering

image
Engineering, 04.07.2019 12:10, Ryantimes2
On a average work day more than work place firs are reorted
Answers: 1
image
Engineering, 04.07.2019 18:10, katelynn73
Atmospheric air has a temperature (dry bulb) of 80° f and a wet bulb temperature of 60° f when the barometric pressure is 14.696 psia. determine the specific humidity, grains/lb dry air. a. 11.4 c. 55.8 d. 22.5 b. 44.1
Answers: 1
image
Engineering, 04.07.2019 18:20, 1230bering
Select any two (2) areas of applications of chain-drive. (clo4) a)-permanent lubrication necessary b)-hydraulic forklift truck operation c)-rigging and heavy moving materials d)-relatively high maintenance costs e)-costlier than belt drives
Answers: 2
image
Engineering, 04.07.2019 18:20, kodyclancy
Aquick transition of the operating speed of a shaft from its critical speed will whirl amplitude. (a) increase (b) limit (c) not affect (d) zero
Answers: 2
You know the right answer?
// This program accepts data about 100 books and// determines a price for each.// The price is 10 ce...

Questions in other subjects:

Konu
Mathematics, 18.03.2021 19:30
Konu
Mathematics, 18.03.2021 19:30