First, read in an input value for the variable inCount. Then, read in inCount integers from input and output each integer on a newline after the string "amount: ". Ex: If the input is 2 65 20, the output is: amount: 65 amount: 20
Added by Sarah B.
Step 1
Read in an input value for variable inCount. Show more…
Show all steps
Your feedback will help us improve your experience
Akash M and 59 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Write a loop that reads positive integers from standard input, printing out those values that are greater than 100, each followed by a space. The loop should terminate when it reads an integer that is not positive. Declare any variables that are needed. Assume the availability of a variable, stdin, that references a Scanner object associated with standard input.
Shelayah R.
Prompt the user to input an integer, a double, a character, and a string, storing each into separate variables. Then, output those four values on a single line separated by a space. (2 pts) Note: This zyLab outputs a newline after each user-input prompt. For convenience in the examples below, the user's input value is shown on the next line, but such values don't actually appear as output when the program runs. Enter integer: 99 Enter double: 3.77 Enter character: z Enter string: Howdy 99 3.77 z Howdy
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD