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
natali 33 [55]
3 years ago
11

Write the simplest statement that prints the following on a single line: 3 2 1 Go! Note: Whitespace (blank spaces / blank lines)

matters; make sure your whitespace exactly matches the expected output.
Computers and Technology
1 answer:
Olin [163]3 years ago
4 0

Answer:

//here is the statement in java.

import java.util.*;

//class definition

class Solution

{

// main method of the class

public static void main (String[] args) throws java.lang.Exception

{

   try{

    // this statement will print the 3 2 1 Go! and go to newline

       System.out.println("3 2 1 Go!");

   }catch(Exception ex){

       return;}

}

}

Explanation:

We can use "System.out.println()" to print the required output same as it required. After printing this, it will go to newline.

Output:

3 2 1 Go!

You might be interested in
Write a method that returns a new array by eliminating the duplicate values in the array using the following method header: Publ
saw5 [17]

Answer:

Following are the program in java language

import java.util.*; // import package

class Main // main class

{

public static void main(String[] args) // main method

{

Scanner sc = new Scanner(System.in); // creating Scanner class object

int[] num= new int[10]; // declaring the array num

System.out.print("Enter 10 numbers:: ");

for (int i = 0; i < num.length; i++) // iterating over the loop

{

num[i] = sc.nextInt(); // taking 10 input integer.....

}

int[] newList1 = eliminateDuplicates(num);// calling the function eliminateDuplicates

System.out.println("The Distinct numbers are: ");

for (int i = 0; i< newList1.length; i++)

{

System.out.print(" " +newList1[i]); // display the new list

}

System.out.println();

}

public static int[] eliminateDuplicates(int[] list) // method definition as mention in question

{

int[] duplicate1 = new int[10]; // creating the array duplicate

int j = 0, I = 0; // variabe declaration

for (int i = 0; i < list.length; i++) // filling the duplicate with 0

{

duplicate1[i] = 0;

}

int count1 = 0; // variable declaration

for(int i = 0; i < list.length; i++)

{

boolean duplicate = false; // creating boolean variable

for(j = 0; j < count1; j++) // iterating over the loop

if(list[i] == duplicate1[j]) // checking the condition

{

duplicate = true; // assigning the duplicate variable to true

break;

}

if(!duplicate) //checking boolean variable duplicate

{

duplicate1[count1] = list[i];

count1++;

}

}

int [] newArray1 = new int[count1]; // creating a new array

for(int i = 0; i < count1; i++) // iterating over the loop

newArray1[i] = duplicate1[i]; // assign the element in the new array

return newArray1; // return array

}

}

Output:

Enter 10 numbers:::1

2

3

2

1

6

3

4

5

2

The Distinct numbers are:1 2 3 6 4 5

Explanation:

In this program we create a eliminateDuplicate method and passing array to them.In this function we create a duplicate array and assign 0 to them by iterating over  the loop then we check the required condition is duplicate or not by making comparison between the duplicate array and list array i.e if(list[i] == duplicate1[j]) . if matches found then it set duplicate = true; .Finally it created a new array and store the distinct element also return the new array element.  In the main method it printed the distinct elements .

7 0
3 years ago
Question 1<br> a node is.<br> •a sever<br> A Cell Phone<br> A Laptop<br> a device on a network
RSB [31]

Answer:

From Networkopoint of view, a node is a redistribution point or communication point or a connection point.

It can also mean devices or data points on a large network Such as laptop, phones, printers, etc

Explanation:

3 0
4 years ago
Help me please thankyou was
sweet [91]

Answer:

Macros

Explanation:

The Macros extensions is used to dave time on repetitive tasks and standardize document formats.

7 0
3 years ago
Write a program that teaches arithmetic to a young child. The program tests addition and subtraction. In level 1, it tests only
Elenna [48]

Answer:

Explanation:

The following program is written in Java and creates three levels with the different set of randomly generated arithmetic problems. As the player goes getting more points they advance every 5 points to the next level.

import java.util.Random;

import java.util.Scanner;

class Main {

   private static Random random = new Random();

   private static Scanner in = new Scanner(System.in);

   static int points = 0;

   public static void main(String[] args) {

       while (true) {

           System.out.println(points);

           if (points < 5) {

               System.out.println("Starting Level 1");

               levelOne();

           } else if (points < 10) {

               System.out.println("Starting Level 2");

               levelTwo();

           } else if (points < 15) {

               System.out.println("Starting Level 3");

               levelThree();

           }

       }

   }

   public static boolean levelOne() {

       int numberOne = random.nextInt(10);

       int numberTwo = random.nextInt((10 - numberOne));

       int answer = numberOne + numberTwo;

       int count = 0;

       while (points < 5 && count < 2) {

           System.out.println("What is " + numberOne + " + " + numberTwo + "?: ");

           int userChoice = in.nextInt();

           if (userChoice == answer) {

               points += 1;

               levelOne();

           } else {

               count += 1;

           }

       }

       return false;

   }

   public static boolean levelTwo() {

       int numberOne = random.nextInt(10);

       int numberTwo = random.nextInt(10);

       int answer = numberOne + numberTwo;

       int count = 0;

       while (points < 10 && count < 2) {

           System.out.println("What is " + numberOne + " + " + numberTwo + "?: ");

           int userChoice = in.nextInt();

           if (userChoice == answer) {

               points += 1;

               levelTwo();

           } else {

               count += 1;

           }

       }

       return false;

   }

   public static boolean levelThree() {

       int numberOne = random.nextInt(10);

       int numberTwo = random.nextInt(10);

       int answer = numberOne - numberTwo;

       int count = 0;

       if (answer <= 0) {

           levelThree();

       }

       while (points < 15 && count < 2) {

           System.out.println("What is " + numberOne + " - " + numberTwo + "?: ");

           int userChoice = in.nextInt();

           if (userChoice == answer) {

               points += 1;

               levelThree();

           } else {

               count += 1;

           }

       }

       return false;

   }

}

3 0
3 years ago
How are computers located on a network
Luba_88 [7]

Answer:

<em>When computers connect on the same network, it is called a local area network, or LAN. </em>

Explanation:

<em>The router is given the IP address for your connection to the Internet and then assigns local IP addresses to each device in your network.</em>

<em />

<em>Hope this can help you </em>

8 0
3 years ago
Other questions:
  • Terry came into work and turned on his computer. During the boot process, the computer shut down. When he tried again, the compu
    14·1 answer
  • You could face mandatory revocation of your license as a result of __________ A. lying about ownership of your vehicle. B. drivi
    14·1 answer
  • If a user has one column in a table and would like to make it into two columns which command should be used?
    8·2 answers
  • Create a loop that will output all the multiples of 5 that are greater than zero and less than 60 (do not include 60). 5, 10, 15
    10·1 answer
  • SOMETHING WRONG WHAT WRONG!!!!!!!
    15·2 answers
  • Write a Java program that prints out a 4x4 square (like the one below)
    11·1 answer
  • What is the purpose of the GETPIVOTDATA function?
    13·2 answers
  • 1. As part of your community, your school, and your neighbourhood, how else does ICT have an impact on social
    11·1 answer
  • Which of these describes a database? Check all of the boxes that apply.
    15·1 answer
  • A computer hacker trying different combinations of characters to crack a password is a ________.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!