answer.
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]
2 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]2 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]2 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
One form of competition-based pricing is going-rate pricing, inwhich a firm bases its price largely on competitors' prices, with
Kobotan [32]

Answer:

Out of the four options , the option that is most suitable  is

option b. Cost, demand

<u>cost</u> or to <u>demand</u>

Explanation:

Going rate pricing is a form of competition based pricing. This pricing is commonly used for homogeneous products i.e., products with very minute distinction or variation among producers.

This type of pricing is based on setting price on the basis of the prevailing market trends in pricing of goods or services, so, the prices are largely based on the competition in the market rather than considering its own cost and demand.

8 0
2 years ago
Write a program that replaces words in a sentence. The input begins with word replacement pairs (original and replacement). The
marin [14]

Answer:

Following are the program in the Python Programming Language

#set variable to input sentence to replace words

sen = input()

#split that sentence

sen = sen.split()

#set variable to input whole sentence

get = input()

#set the for loop to replace words

for i in range(0, len(sen), 2):

 #check condition when words of sen is in get

 if sen[i] in get:

   #then, replace words

   get = get.replace(sen[i], sen[i+1])

#print the whole string after replacing

print('\n',get)

Explanation:

<u>Following are the description of the program</u>.

  • Set a variable 'sen' that get a sentence for replacing the word.
  • Split that sentence by split() method and again store that sentence in the following variable.
  • Set a variable 'get' that gets the whole sentence from the user.
  • Set the for loop for replacing words then, set the if conditional statement that checks the condition that the variable 'sen' in the variable 'get' then replace the words.
  • Finally, print the whole sentence after the replacement.
4 0
2 years ago
​<br><br> Access from and output to the register is slow true false​
Nataly_w [17]

Answer:

false

Explanation:

it depends most of time so false

4 0
2 years ago
When you check to see how much RAM, or temporary storage you have available, you are checking your _____.
victus00 [196]

Answer: primary memory

5 0
2 years ago
William is an amateur photographer who plans to create a portfolio to improve his career prospects. He wants to capture a mother
kobusy [5.1K]

Answer:

Line of sight and rules of composition

Explanation:

He needs the rules of composition in order to use the line of sight

8 0
2 years ago
Other questions:
  • Which of the registration patterns is best suited for complex architecture? A. Client side discovery pattern B. Third party regi
    13·1 answer
  • ________ is a free online service that enables a user to contact a cell phone number to hear who answers the telephone without i
    5·1 answer
  • Assume the availability of a function is_prime. Assume a variable n has been associated with positive integer. Write the stateme
    15·1 answer
  • Define a method named roleOf that takes the name of an actor as an argument and returns that actor's role. If the actor is not i
    8·1 answer
  • Lynn runs the locate command and the results include many files from a directory that she doesn't want to include in her search.
    11·2 answers
  • Consider the following class:
    7·1 answer
  • A company has offices in Honolulu, Seattle, Ogden, and Dublin, Ireland. There are transmission links between Honolulu and Seattl
    10·1 answer
  • "There are no longer mature industries; rather, there are mature ways of doing business," he is referring to the high demand of
    9·1 answer
  • In this problem, you will derive the efficiency of a CSMA/CD-like multiple access protocol. In this protocol, time is slotted an
    14·1 answer
  • Which of the following statement is False? 1 point Context free language is the subset of context sensitive language Regular lan
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!