Question: Write a segment of code that reads a sequence of integers from the keyboard until the user enters a negative number. It should then output

Write a segment of code that reads a sequence of integers from the keyboard until the user enters a negative number. It should then output a count of the number of even integers and the number of odd integers read (not including the final negative value in either count). Remember - 0 is an even number. For example, if the sequence is: 2 7 15 5 88 1243 104 -1 Then the output should be Number of even integers: 3 Number of odd integers: 4 Write a segment of code that reads a String from the keyboard and then outputs each letter in the String twice. For example, if the input String is "Welcome!" the code should output "WWeellccoommee!!" to the screen
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
