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
blagie [28]
3 years ago
3

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

and after each line of text Ex: countNum = 3 outputs: Ready! 3 2 1 Blastoff!
Computers and Technology
2 answers:
Y_Kistochka [10]3 years ago
4 0

Answer:

C# code:

#include <stdio.h>

// start main function

int main()

{

  // declare the required variables

  int userNum = 0;

  int i = 0;

  // set userNum to 3

  userNum = 3;

  // print the 'Ready!'

  printf("Ready!");

  // print the new line

  printf("\n");

  // use the for-loop to print userNum ... 2 1

  for (i = userNum; i >= 1; i--)

  {

      // print current value of i

      printf("%d", i);

      // print the new line

      printf("\n");

  } // end for-loop

  // print the 'Blastoff!'

  printf("Blastoff!");

  // print the new line

  printf("\n");

 

  // return from the program

  return 0;

} // end of main function

Explanation:

Sholpan [36]3 years ago
4 0

Answer:

import java.util.Scanner;

public class BlastOff {

   public static void main(String[] args) {

    Scanner in = new Scanner(System.in);

       System.out.print("Enter Count Down Number: ");

       int countNum = in.nextInt();

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

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

           System.out.println(i);

       }

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

   }

}

Explanation:

Using Java programming language:

  • Prompt and receive count down number from the user using the scanner class
  • Print the string Ready! <em>System.out.println("Ready!");</em>
  • Using a for loop Output the numbers from the variable countNum down to 1
  • Outside of the for loop print Blastoff! <em>System.out.println("Blastoff!");</em>
  • All outputs are on  seperate lines by using<em> </em><em>.println()</em>
You might be interested in
What was a result of george washington's belief in the sovereignty of the people instead of monarchy?
Ilya [14]
<span>George Washington's belief in the sovereignty of the people instead of monarchy led him to reject a third term as president.</span>
8 0
3 years ago
Space bar in computer​
romanna [79]

Answer: Its the one in the middle the really long thingy it looks like a rectangle

Explanation:

ITS IN THE MIDDLE

3 0
3 years ago
Write a program to prepare the monthly charge account statement for a customer of CS CARD International, a credit card company.
WITCHER [35]

Answer:

import java.util.*;

import java.text.*;

class CreditCardBill

{

public static void main(String[] args)

{

Scanner sc = new Scanner(System.in);

NumberFormat defaultFormat = NumberFormat.getCurrencyInstance(Locale.US);

System.out.println("CS Card International Statement");

System.out.println("===============================");

System.out.print("Previous Balance: $");

double prevBalance = sc.nextDouble();

System.out.print("Additional Charges: $");

double addCharges = sc.nextDouble();

double interest;

if(prevBalance == 0)

interest = 0;

else

interest = (prevBalance + addCharges) * 0.02;

System.out.println("Interest: "+defaultFormat.format(interest));

double newBalance = prevBalance + addCharges + interest;

System.out.println("New Balance: "+defaultFormat.format(newBalance));

double minPayment;

if(newBalance < 50)

minPayment = newBalance;

else if(newBalance <= 300)

minPayment = 50.00;

else

minPayment = newBalance * 0.2;

System.out.println("Minimum Payment: "+defaultFormat.format(minPayment));

}

}

5 0
3 years ago
What is the binary conversion of 179.187.223.21?
Lemur [1.5K]

Explanation:

I hope its the correct answer i'm not sure!

6 0
3 years ago
Read 2 more answers
The radial gradient option creates a gradient that shades from the starting point to the end point in a _________ pattern.
rusak2 [61]

Answer:

The correct answer is <u>Circular</u>

I hope this helps! ^-^

7 0
2 years ago
Other questions:
  • What is wrong, logically, with the following code? if (x &gt; 10) System.out.println("Large"); else if (x &gt; 6 &amp;&amp; x &l
    11·1 answer
  • In a large company today, you will often find an infrastructure that includes hundreds of small LANs linked to each other as wel
    7·1 answer
  • "Because Standard Error and Standard Ouput represent the results of a command and Standard Input represents the input required f
    6·1 answer
  • Define function print_popcorn_time() with parameter bag_ounces. If bag_ounces is less than 3, print "Too small". If greater than
    14·2 answers
  • Manuel has set up his network so that some employees can open and view files but are unable to edit them. Others can open, view,
    10·1 answer
  • A selected graphic appears surrounded by a(n) ______, which has small squares and circles around its edges.
    7·1 answer
  • Answer Please
    12·2 answers
  • How do I change my PATH?
    7·2 answers
  • Which of the following are factors that can cause damage to a computer? Check all of the boxes that apply.
    13·2 answers
  • What is the difference between encoding and decoding?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!