subject

Write a loop that reads positive integers from standard input and that terminates when it reads an integer that is not positive. after the loop terminates, it prints out the sum of all the even integers read and the sum of all the odd integers read. (the two sums are separated by a space). declare any variables that are needed.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 21:00
In this lab, you add a loop and the statements that make up the loop body to a c++ program that is provided. when completed, the program should calculate two totals: the number of left-handed people and the number of right-handed people in your class. your loop should execute until the user enters the character x instead of l for left-handed or r for right-handed. the inputs for this program are as follows: r, r, r, l, l, l, r, l, r, r, l, x variables have been declared for you, and the input and output statements have been written.
Answers: 3
question
Computers and Technology, 22.06.2019 07:30
What type of computer network ensures high security ?
Answers: 1
question
Computers and Technology, 22.06.2019 13:00
Write a program which asks you to enter a name in the form of first middle initial last. so you might enter for example samuel p. clemens. use getline to read in the string because it contains spaces. also, apparently the shift key on your keyboard doesn’t work, because you enter it all lower case. pass the string to a function which uses .find to locate the letters which need to be upper case and use toupper to convert those characters to uppercase. the revised string should then be returned to main in the form last, first mi where it will be displayed.
Answers: 1
question
Computers and Technology, 22.06.2019 15:00
Which of the following statements tests if students have a grade of 70 or above, as well as fewer than five absences? a: if(grade > = 70 and daysabsent < = 5): b: if(grade > = 70 or daysabsent < = 5): c: if(grade > 70 and daysabsent < = 5): d: if(grade > 70 or daysabsent < = 5): i took the test the answer is a
Answers: 1
You know the right answer?
Write a loop that reads positive integers from standard input and that terminates when it reads an i...
Questions
question
Chemistry, 03.12.2019 06:31
question
Mathematics, 03.12.2019 06:31
question
Mathematics, 03.12.2019 06:31
question
Mathematics, 03.12.2019 06:31
Questions on the website: 13722360