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
Alenkinab [10]
2 years ago
11

1) Prompt the user to enter two words and a number, storing each into separate variables. Then, output those three values on a s

ingle line separated by a space. (Submit for 1 point) Enter favorite color: yellow Enter pet's name: Daisy Enter a number: 6 You entered: yellow Daisy 6
Computers and Technology
1 answer:
masya89 [10]2 years ago
7 0

Answer:

import java.util.Scanner;

public class TestClock {

   public static void main(String[] args) {

 Scanner in = new Scanner (System.in);

       System.out.print("Enter favorite color:");

 String word1 = in.next();

       System.out.print("Enter pet's name:");

 String word2 = in.next();

       System.out.print("Enter a number:");

 int num = in.nextInt();

       System.out.println("you entered: "+word1+" "+word2+" "+num);

   }

}

Explanation:

Using Java Programming language

  1. Import the Scanner class
  2. create an object of the scanner class
  3. Prompt user to enter the values for the variables (word1, word2, num)
  4. Use String concatenation in System.out.println to display the output as required by the question.

You might be interested in
Write the simplest statement that prints the following on a single line: 3 2 1 Go! Note: Whitespace (blank spaces / blank lines)
Olin [163]

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!

4 0
2 years ago
Which type of link is normally used to interconnect two peripheral modules (pm) in the digital multiplex system (dms)?
natta225 [31]

The answer is DS-30A. The Roland DS30A is a 24-bit Digital Reference Monitor which can add pristine 24-bit/96kHz. They are small speakers.

4 0
2 years ago
your brother has made a battery operated torch by using 2 cells & has come to ask you how he may make the torch more powerfu
torisob [31]

Answer: Add more cells in series.

Explanation:

Adding more cells in series will add voltage which will increase the power.

5 0
3 years ago
1. When a program routine constantly looks a certain condition and executes a command when the condition is met, this is called:
zepelin [54]
This is Called Polling
8 0
3 years ago
You're using disk management to view primary and extended partitions on a suspect's drive. the program reports the extended part
kodGreya [7K]

The best assumption to make is that there is a hidden partition and the drive needs to be further searched.

5 0
3 years ago
Other questions:
  • He would like to get rid of the graph. What will accomplish
    8·1 answer
  • Write Java program to allow the user to input the amount of deposit, yearly interest rate (percentage), and income tax(percentag
    9·1 answer
  • You were replying to e-mail when suddenly your computer started to display random messages, and stopped responding to keyboard a
    10·1 answer
  • Univariate linear regression Note: Solutions to this problem must follow the method described in class and the linear regression
    7·1 answer
  • PLEASE HELP
    6·1 answer
  • How many mustangs are built every day
    13·2 answers
  • Is there a way to get back old messages that you didn't mean to delete??? I have a Samsung S5 and I really really need help. I d
    11·2 answers
  • ____ are programs that run independently and travel between computers and across networks.
    7·1 answer
  • John Cleaver is the CEO of Tech World, which is a retail store that sells computers, monitors, cameras, televisions and many oth
    6·1 answer
  • Which of the following is opened when the Find command is clicked? Question 9 options: Navigation Pane Insert Hyperlink dialog b
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!