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
Romashka-Z-Leto [24]
1 year ago
13

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: firstNumber = 3 outputs:
Computers and Technology
3 answers:
daser333 [38]1 year ago
5 0

Answer:

//This program is written in C++ Programming Language

// Comments are used for explanatory purpose

// Program starts here

#include<iostream>

using namespace std;

int main()

{

// Declare Variable

int firstNumber;

// Accept Input for firstNumber

cin>> firstNumber;

// Print firstNumber

cout<<"firstNumber = "<<firstNumber<<endl;;

//Start Loop

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

{

// Print iteration value

cout<<firstNumber<<endl;

}

// Print Run! at the end

cout<<"Run!";

return 0;

//End of Program

}

LUCKY_DIMON [66]1 year ago
3 0

Complete Question:

Write code that prints: Ready! userNum ... 2 1 Blastoff! Your code should contain a for loop. Print a newline after each number and after each line of text Ex: userNum = 3 outputs: Ready! 3 2 1 Blastoff!

Answer:

public class TestClock {

   public static void main(String[] args) {

       int userNum= 3;

       System.out.print("Ready! "+userNum+" ");

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

           userNum--;

           System.out.print(userNum+" ");

       }

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

   }

}

Explanation:

  1. Create and initialize userNum
  2. Use System.out.print to print the sequence ("Ready! "+userNum+" ") on same line
  3. use for statement with this condition for (int i=userNum;i>1; i--) decremeent userNum by 1 after each loop iteration and print userNum on same line
  4. outside the for loop print "Blasoff!"
Guest1 year ago
0 0

#include <iostream>
using namespace std;

int main() {
int firstNumber;
int i;

cin >> firstNumber;

for(i = firstNumber; i>0; --i) {
if (i == firstNumber && i>0) {
cout << "Ready!" << endl;
cout << firstNumber << endl;
}
else if (i!= firstNumber && i>0){
firstNumber = (firstNumber-1);
cout << firstNumber << endl;
}
}
if (firstNumber<= 0){
cout << "Ready!" << endl;
}
cout << "Run!" << endl;
return 0;
}</iostream>

You might be interested in
Select the examples that best demonstrate likely employers for Journalism and Broadcasting workers. Check all that apply.
Delicious77 [7]

Answer:

a radio station

a newspaper

a television network

Explanation:

4 0
1 year ago
Read 2 more answers
Which of the following is an advantage of inserting a page number field in your document rather than inserting each page number
Artyom0805 [142]

The advantage of inserting the page number field is that the page number field could show the current page number.

The following information should be relevant with respect to the page number:

  • The page number field & the actual page number should be formatted.
  • The page number field & the actual page number both could be inserted into the header or footer.
  • The page number field & the actual page number could be easily inserted into the document.

Therefore we can conclude that the advantage of inserting the page number field is that the page number field could show the current page number.

Learn more about the page number here: brainly.com/question/3063419

8 0
1 year ago
Jason works as a financial investment advisor. He collects financial data from clients, processes the data online to calculate t
Ghella [55]

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The correct answer to this question is an online decision support system. Because the decision support systems process the data, evaluate and predict the decision, and helps the decision-makers,  and offer real-time information immediately in making the decision in an organization. So the correct answer to this question is the decision supports system.

Why other options are not correct

Because the transaction processing system can only process the transaction and have not the capability to make the decision for the future. Office support processing system support office work, while the batch processing system process the task into the batch without user involvement.   however, online executive processing does not make decisions and offer timely information to decision-makers in an organization.

3 0
2 years ago
Does the submission include the file "SuperPower.java"? Does the file include a public class called "SuperPower"? Does the class
Oduvanchick [21]

Answer:    

Here is the program fulfilling all the requirements given:

import javax.swing.JOptionPane;      

public class SuperPower{

public static void main(String[] args) {

String power;

power = JOptionPane.showInputDialog("What is your super power?");

power = power.toUpperCase();

JOptionPane.showMessageDialog(null, power);} }

Explanation:

Does the file include a public class called "SuperPower"

See the statement:

public class SuperPower

Does the class include a public method called "main"? Is the "main" method static?

See the statement:

public static void main(String[] args)

Does the main method have a String assignment statement that uses "JOptionPane.showInputDialog"

See the statement:

power = JOptionPane.showInputDialog("What is your super power?");

Does the main method have a statement that uses "JOptionPane.showMessageDialog"?

See the statement:

JOptionPane.showMessageDialog(null, power);

Does the program convert the String from "JOptionPane.showInputDialog" using the "toUpperCase" method?

See the statement:

power = power.toUpperCase();

Does the submission include a screenshot that shows an Input dialog that asks, "What is your superpower?" Does the submission include a screenshot that shows a Message dialog stating " TO THE RESCUE!", where "" is the input converted to upper case?

See the attached screenshots

If the program does not let you enter an exclamation mark after "to the rescue" then you can alter the code as follows:

import javax.swing.JOptionPane;

public class SuperPower{

public static void main(String[] args) {

String power;

power = JOptionPane.showInputDialog("What is your super power?");

power = power.toUpperCase();

JOptionPane.showMessageDialog( null, power+"!");} } // here just add an exclamation mark which will add ! after the string stored in  power

5 0
1 year ago
1. A pure aggregator is best defined as a blog that
miss Akunina [59]
A pure aggregator is best defined as a blog that aggregates blog content from other sources.

An Aggregator blog or website don't write its own content. It aggregates information or content from third-party websites. There are different types of aggregator websites such as a poll aggregator, a review aggregator, and a search aggregator.
5 0
1 year ago
Other questions:
  • Which data type stores images and audio visual clips?
    15·1 answer
  • Which of these is an advantage of using the Clipboard task pane? A. You are able to apply OLE easily. B. There are more paste op
    15·2 answers
  • Which computer applications can Mr. Crowell use to make the classroom learning more stimulating and interesting? Mr. Crowell has
    9·2 answers
  • Mathematical computations by a computer are faster than your quickest mathematical computations because the top speed of a neura
    13·1 answer
  • In mathematics, the notation n! represents the factorial of the nonnegative integer n. The factorial of n is the product of all
    7·1 answer
  • Write a algorithm to attend birthday party​
    8·2 answers
  • This program finds the sum and average of three numbers. What are the proper codes for Lines a and b?
    6·2 answers
  • What three requirements are defined by the protocols used in network communications to allow message transmission across a netwo
    11·1 answer
  • For a custom App uploaded to Microsoft Teams, if an organization wants to disallow users from updating the settings of the custo
    12·1 answer
  • your company decides to implement a RAID-5 array on several file servers. Which feature is provided by this deployment
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!