subject

Given that two int variables, total and amount, have been declared, write a loop that reads non-negative values into amount and adds them into total. The loop terminates when a value less than 0 is read into amount. Don't forget to initialize total to 0. Instructor Notes: Be sure to complete exercises 10087 and 10088 before attempting 10089. "Reads non-negative values into amount" means that values are read (input) into amount from stdin. As long as a given input value is non-negative, the code keeps adding the result into total. But, if a negative value is read, then the loop terminates, without adding that negative result into total. The negative value is known as a "sentinel" value, which means a value that signals something rather than having a quantitative meaning.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 12:10
1. declare a constant named cents_per_pound and initialize with 25. 2. get the shipping weight from user input storing the weight into shipweightpounds. 3. using flat_fee_cents and cents_per_pound constants, assign shipcostcents with the cost of shipping a package weighing shipweightpounds.
Answers: 2
question
Computers and Technology, 23.06.2019 00:20
The open systems interconnection (osi) reference model: defines standards for many aspects of computing and communications within a network. is a generic description for how computers use multiple layers of protocol rules to communicate across a network. defines standards for wireless local area network (wlan) communication protocols. details the advantages and disadvantages of various basic network cabling options.
Answers: 1
question
Computers and Technology, 23.06.2019 00:30
Pl i need the answer now ! which one of the following is considered a peripheral? a software b mouse c usb connector d motherboard
Answers: 1
question
Computers and Technology, 23.06.2019 09:00
Before you record your own voice, you should a. record other people's voices b. warm up and practice difficult names c. listen to your favorite songs d. read a transcript of a good radio news segment
Answers: 1
You know the right answer?
Given that two int variables, total and amount, have been declared, write a loop that reads non-nega...
Questions
question
Mathematics, 27.06.2020 02:01
question
Social Studies, 27.06.2020 02:01
question
Mathematics, 27.06.2020 02:01
question
Mathematics, 27.06.2020 02:01
Questions on the website: 13722359