First, read the first integer from input. Then, read the remaining integers while the integers are in the range -25 to 15, both exclusive. Output the total number of integers read in the given range. End with a newline.
Added by Brenda G.
Step 1
Step 1: Read the first integer from the input. Show more…
Show all steps
Your feedback will help us improve your experience
Akash M and 91 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
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
Akash M.
How do I make a program whose input is two integers? Output the first integer and subsequent increments of 10 as long as the value is less than or equal to the second integer. For example, if the input is -15 and 30, the output is -15 -5 5 15 25. If the second integer is less than the first, as in 20 and 5, the output is "Second integer can't be less than the first." For coding simplicity, output a space after every integer, including the last.
Shelayah R.
Write a program that repeatedly reads in integers until a negative integer is read. The program also keeps track of the largest integer that has been read so far and outputs the largest integer at the end. Ex: If the input is: 2 77 17 4 -1 the output is: 77 Assume a user will enter at least one non-negative integer.
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