subject

Does anyone know how to use a while loop and ask a user to input positive integers until the user enters 0 and print the sum so far after each input, then print final sum at the end in edhesive?

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 23:00
The animal classthis class represents a an animal residing at a zoo. it has a weight (in pounds),height (in inches), a name, and a color. the methods in the class include constructors,getters, and a tostring. you will finish the implementation of these methods. referto the code documentation.1.getters: you will need to implement getter methods. these get a value (froma member variable) in the animal class. you will make a getter method toreturn each variable (weight, height, name, color). reference getname if youare having issues.2.tostring: you will need to finish the tostring method. this returns a stringcontaining information about an animal. the output string should be of theformat: ” (name) , a ( color )â’colored animal . ( weight ) pounds , ( height ) inches .\n”the height and weight are formatted to 1 decimal place. recall from lab 1how to format strings neatly using string. see the reference sectionfor more about string.format.
Answers: 2
question
Computers and Technology, 23.06.2019 01:50
Write a program that uses a random number generator to generate a two digit positive integer and allows the user to perform one or more of the following operations: a. double the number. b. reverse the digits of the number. c. raise the number to the power of 2, 3, or 4. d. sum the digits of the number. e. if the number is a two-digit number, then raise the first digit to the power of the second digit. f. if the number is a three-digit number and the last digit is less than or equal to 4, then raise the first two digits to the power of the last digit. after performing an operation if the number is less than 10, add 10 to the number. also, after each operation determine if the number is prime. each successive operation should be performed on the number generated by the last operation. your program should not contain any global variables and each of these operations must be implemented by a separate function. also, your program should be menu driven. 7. (fraction calculator) write a program that
Answers: 1
question
Computers and Technology, 23.06.2019 13:30
Drag the tiles to the correct boxes to complete the pairs. match the errors with their definitions. #name #value #ref when a formula produces output that is too lengthy to fit in the spreadsheet cell arrowright when you enter an invalid cell reference in a formula arrowright when you type text in cells that accept numeric data arrowright when you type in a cell reference that doesn’t exist arrowright reset next
Answers: 1
question
Computers and Technology, 24.06.2019 01:30
Suppose a cpu with a write-through, write-allocate cache achieves a cpi of 2. what are the read and write bandwidths (measured by bytes per cycle) between ram and the cache? (assume each miss generates a request for one block.)
Answers: 1
You know the right answer?
Does anyone know how to use a while loop and ask a user to input positive integers until the user en...
Questions
question
Mathematics, 04.12.2020 17:40
question
Mathematics, 04.12.2020 17:40
question
Mathematics, 04.12.2020 17:40
question
Mathematics, 04.12.2020 17:40
question
Mathematics, 04.12.2020 17:40
question
Arts, 04.12.2020 17:40
question
History, 04.12.2020 17:40