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]
3 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]3 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
16. A/An __________ is operated on the principle that the dying have special needs and wants that hospital personnel are too bus
marta [7]

Answer:

Hospices

Explanation:

A/An <u>Hospices</u> is operated on the principle that the dying have special needs and wants that hospital personnel are too busy to handle.

5 0
2 years ago
Read 2 more answers
For which input values will the following loop not correctly compute the maximum of the values? 1. Scanner in = new Scanner (Sys
My name is Ann [436]

Answer:

The answer is "Option d".

Explanation:

Please find the complete question in the attached file.

8 0
3 years ago
Your location has been assigned the 172.149.254.0 /24 network. You are tasked with dividing the network into 13 subnets with the
ira [324]
  • The subnet mask would be a 32-bit integer which is formed by assigning the host bits to all 0's and the networking bits to so many 1's.
  • In this method, the subnetting separates the IP address between host and network addresses.
  • The subnet mask covers an IP address with its 32-bit number, thus the term "mask".

Given:

Network IP address \bold{= 172.149.254.0 /24}

Subnet numbers \bold{= 13}

Calculating the borrow bits:

\to  \bold{= ceil(\log_{2} 13) = 4 \ bits}

a)

Calculating the dotted decimal value for the subnet mask:

\to \bold{11111111.11111111.11111111.00000000}\\\\\to \bold{255.255.255.240}\\\\

b)

The additional bits which will be needed to mask the subnet mask that is = 4.

Learn more: brainly.com/question/2254014

4 0
3 years ago
Programming challenge description: Given a string comprising just of the characters (,),{,},[,] determine if it is well-formed o
nadezda [96]

Answer:

Employing Java language,

Explanation:

//for using stack data structure

import java.util.Stack;

//class definition

public class BracketMatch {

   //function to find the string is well formed or not

   public static boolean isWellFormed(String str) {

       //variable to store the character value

       char ch;

       //check if the first character itself is the end of the brackets

       if (str.charAt(0) == ')'||str.charAt(0) =='}'||str.charAt(0) ==']')

           return false;

       //creating a stack of character type

       Stack<Character> stack = new Stack<Character>();

       //iterating through the characters in string

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

           //storing the current character from the string in the variable

           ch = str.charAt(i);

           if(ch == '('||ch=='{'||ch=='[')

               //if the character is starting of the brackets push it into stack

               stack.push(ch);

           else if(ch == ')')

               //if it is closing bracket and the stack is empty then the string is not well formatted

               if(stack.empty())

                   return false;

               else if(stack.peek() == '(')

                   stack.pop();

               else

                   return false;

           else if(ch == '}')

               if(stack.empty())

                   return false;

               else if(stack.peek() == '{')

                   stack.pop();

               else

                   return false;

       }

       //returning the stack content, if the string will be well formed the stack would be empty

       //after all the operations

       return stack.empty();

   }

   //main method

   public static void main(String[] args) {

       //calling function to find if the string is welll formatted or not

       System.out.println(isWellFormed("{}"));

       //calling function to find if the string is welll formatted or not

       System.out.println(isWellFormed("([)]"));

   }

}

5 0
3 years ago
Typically, when an organization purchases Internet access from an Internet Service Provider (ISP), the ISP will grant it
hodyreva [135]

Answer:

(B) A single public IP address that it can use for NAT

Explanation:

Because the IPV4 IP protocol is still used today, the number of available IP addresses is limited (only 4,294,967,296 addresses in the world), for this reason, the most correct practice is the assignment of a single public IP to those companies that acquire services from an ISP, with some few exceptional cases of companies that own several.

So that the company's addressing can be executed successfully, the use of NATs is enabled, this allows the translation of network addresses, allowing the company to have as many private networks as necessary and that these can be communicated Correctly with the global network, the Internet, through the public IP of the company.

7 0
3 years ago
Other questions:
  • Which of the following is something that scientists often seek by using computer models and simulations?
    8·2 answers
  • An example of how a merge field will appear in a document is ______.
    7·2 answers
  • The addElement operation for the linked implementation must determine the parent of the next node to be inserted. Why?
    5·1 answer
  • A5.3 1012 kg satellite is 1,800 m from another satellite that has a mass of 3.5 x 108 kg. What is the gravitational
    6·1 answer
  • Which risk management framework does the organization of standardization publish
    13·1 answer
  • What is the best operating system
    12·1 answer
  • Which party controlled the White House and politics in the late 1800s, except for Grover
    6·2 answers
  • Describe any five GSM PLMN basic services?
    10·1 answer
  • The Curiosity Rover has recently landed on Mars and likes to send Twitter updates on its progress. If a tweet is posted 10 minut
    6·1 answer
  • What goes in between the &lt; &gt; when declaring a new ArrayList?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!