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
sineoko [7]
3 years ago
15

Java Question-5 Declare and initialize two variables called first and second. Write a single statement that will print the messa

ge "first is " followed by the value of first, and then space, followed by "second = ", followed by the value of the second. Ex: first is 55 second = 123
Computers and Technology
1 answer:
notsponge [240]3 years ago
4 0

import java.util.Scanner;

public class HelloWorld {

   public static void main(String[] args) {

       Scanner reader = new Scanner(System.in);

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

       int number1 = reader.nextInt();

       int number2 = reader.nextInt();

       // println() prints the following line to the output screen

       System.out.println("The first is " + number1+" and second= "+number2);

   }

}

You might be interested in
Which of the following is a sign that a website is inappropriate?
nata0808 [166]

Answer:

A

Explanation:

If you find something embarrassing, its more likely that other people with also think its embarrassing. All the other points are on the internet right now. Amazon sells things, News show information and there are political campaigns to show you there offers

3 0
3 years ago
Read 2 more answers
Problem 1 Calculating the tip when you go to a restaurant is not difficult, but your restaurant wants to suggest a tip according
DIA [1.3K]

Answer:

bill = float(input("Enter the bill amount: "))

rating = int(input("Choose a rating: 1 = Totally satisfied, 2 = Satisfied, 3 = Dissatisfied.: "))

if rating is 1:

   tip = bill * 0.2

elif rating is 2:

   tip = bill * 0.15

elif rating is 3:

   tip = bill * 0.1

print("The rating is: " + str(rating))

print("The tip is: $%.2f" % (tip))

Explanation:

*The code is in Python

- Ask the user for the <em>bill</em> and <em>rating</em>

- Depending on the <em>rating</em>, calculate the <em>tip</em> using <u>if else</u> statement i.e. If the rating is chosen as 1, calculate the tip by taking 20 percent of the bill.

- Print the <em>rating</em> and the <em>tip</em>

4 0
3 years ago
What natural resources products are discussed in the article? Are they renewable or nonrenewable?
Alex

Where is the article

4 0
3 years ago
Read 2 more answers
WHICH OF THE FOLLOWING RANGES OF CELLS IS CORRECTLY NAMED?
olganol [36]
The answer is (d.) A5:E5

In a worksheet, the cell is where you enter the information and the contents. It's an intersection of a row and a column in which column is identified by letters and numbers for row. Every cell has a name based on the column and row intersection. For example an intersection from column A and Row 5 is called A5. Cell range refer to a group of cells. They are named after the first and the last cell separated by a colon.
7 0
3 years ago
You want to be able to access your home computer using remote desktop while traveling. you enable remote desktop, but you find t
solong [7]
Get a program for this perpose or perhaps get a new computer
5 0
3 years ago
Read 2 more answers
Other questions:
  • Why were mechanical calculators developed?
    8·2 answers
  • What are the possible sources of the information that defines the functional dependencies that hold among the attributes of a re
    15·1 answer
  • Given this method comment, fill in the blank in the method implementation. /* Deposits money into the bank account amount: the a
    6·1 answer
  • For which punctuation symbol will you use the ring finger of your right hand?
    9·1 answer
  • When using Regedit to browse through the registry, the key that is highlighted is the ________, and its value entries are visibl
    5·1 answer
  • Write a Python program that inputs an integer between 0 and 1000 and adds all the digits in the integer. For example, if integer
    6·1 answer
  • Which statement is most likely to be true about a computer network?
    12·2 answers
  • F1: 2^14 formula ....................................................................
    10·1 answer
  • Personal statements School leaver
    15·1 answer
  • Mechanisms that can be used to rescue accident victims
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!