1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
EastWind [94]
3 years ago
15

Write code that prints: Ready! firstNumber ... 2 1 Run! Your code should contain a for loop. Print a newline after each number a

nd after each line of text. Ex: If the input is: 3 the output is: Ready! 3 2 1 Run!
Computers and Technology
1 answer:
notsponge [240]3 years ago
8 0

Answer:

Explanation:

The following code is written in Java. It asks the user to enter the first number. Then it saves that number in a variable called firstNumber. It then uses that number to loop backwards from that number to 1 and goes printing out the countdown text. A test case has been created and the output can be seen in the attached image below.

import java.util.Scanner;

class Brainly {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.print("Enter First Number: ");

       int firstNumber = in.nextInt();

       System.out.println("Ready!");

       for (int i=firstNumber; i>0; i--) {

           System.out.println(i);

       }

       System.out.println("Run!");

   }

}

You might be interested in
Received a $600 utility bill for electricity usage in july to be paid in august.
Marizza181 [45]
I guess the answer would be B if it was a choice.
<span>b. owed wages to 10 employees who worked three days at $100 each per day at the end of July. the company will pay employees at the end of the first week of august.</span><span />
5 0
4 years ago
Sketch the frequency response?
natita [175]
Well... it looks too complicated for anyone in the whole universe. :\
5 0
4 years ago
Which ipv4 ip class provides for 126 unique networks, each having up to 16,777,214 hosts?
Sliva [168]
Class A.






----------------------------------------
3 0
3 years ago
If my 98 dodge ram 1500 truck is dropping RPM's when i stop does that mean i need new throttle body sensors or does it mean i ne
geniusboy [140]
You might need a new 02 sensor and i really dont know about the vacuum leak.
6 0
3 years ago
Read 2 more answers
Suppose a file system can have three disk allocation strategies, contiguous, linked, and indexed. We have just read the informat
otez555 [7]

Answer:

Since we are using three disk allocation strategies,continuous linked and indexed,therof to process and read allocation strategies we need 99830 disk blocks.

6 0
4 years ago
Other questions:
  • How do i connect wifi direct from pc to phone​
    15·1 answer
  • Importance of being having data on hand​
    7·1 answer
  • 3. Which of the following is the best definition of a workplace policy?
    7·1 answer
  • In graphical linear programming to maximize profit, the objective function is: I. a family of parallel lines. II. a family of is
    11·1 answer
  • Assume we have a two-class learning problem where the labeled data consists of 1,000 data points from one class, and 10 data poi
    15·1 answer
  • Write a method named countInRange that accepts three parameters: an ArrayList of integers, a minimum and maximum integer, and re
    6·1 answer
  • Please help me solve am wai...​
    11·1 answer
  • What would be the printed output of the Python code to the right?
    14·1 answer
  • What is not recyclable in a<br> hybrid car<br> hydrogen car<br> petrol car
    15·1 answer
  • What is a zerø-day exploit? No go.ogle &gt;:(
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!