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
Kryger [21]
2 years ago
13

Compile and Execute a Program

Computers and Technology
1 answer:
ELEN [110]2 years ago
3 0

Answer:

import java.util.Scanner;

// Needed for the Scanner class This program calculates the user's gross pay.

public class Pay {

public static void main(String[] args) {

// Create a Scanner object to read from the keyboard.

Scanner keyboard = new Scanner(System.in);

// Identifier declarations

double hours;

// Number of hours worked

double rate;

// Hourly pay rate

double pay;

// Gross pay

// Display prompts and get input.

System.out.print("How many hours did you work? ");

hours = keyboard.nextDouble();

System.out.print("How much are you paid per hour? ");

rate = keyboard.nextDouble();

// Perform the calculations.

if (hours <= 40) {

pay = hours * rate;

}

else

{

pay = (hours - 40) - (1.5 * rate) + 40 - rate;

}

// Display results.

System.out.println("You earned $" + pay);

}

}

Explanation:

You might be interested in
The goal of a system is to
andreyandreev [35.5K]

Answer:

The answer is option C, which is: perform a task

6 0
3 years ago
Berat wants to compare images of what the streets of New York City looked like one hundred years ago to now. Which of the follow
Vesnalui [34]

Answer:

I think the answer would be D.

7 0
3 years ago
Read 2 more answers
Assume we are using the simple model for floating-point representation as given in this book (the representation uses a 14-bit f
Artemon [7]

Answer:

The representation of 100.0 in the floating-point representation is computed as follows: First convert the given number 100.0 in the binary form. 10010 = 11001002 the binary representation.

Explanation:

3 0
2 years ago
Which of the following shows the assignment of a string to a variable? Select 3 options.
satela [25.4K]

Answer:

23, (23)

Explanation:

7 0
2 years ago
Read 2 more answers
I need help with these
solmaris [256]

Answer:

Choose internet is the right answer

7 0
2 years ago
Other questions:
  • How can investors receive compounding returns
    13·1 answer
  • On other questions, how do I write my own question, without commenting on others questions? It is only allowed two, I think, the
    13·1 answer
  • Answer the following questions which are based on the study "Patients' Engagement with Sweet Talk." Submit your answers to the e
    9·1 answer
  • Extinction of a species is always a negative impact on the Earth.<br><br> True<br> False
    8·1 answer
  • Tell me the most scariest website you know and i'll give you brainlest
    5·1 answer
  • How is a UDP socket fully identified? What about a TCP socket? What is the difference between the full identification of both so
    9·1 answer
  • Write a pseudocode statement that declares the variable total so it can hold integers. Initialize the variable with the value 0
    9·1 answer
  • Something I should look for when trying to decide if a source is credible is the publication's ....
    10·1 answer
  • I have the requirements for Ace rank on Brainly but hasn't given me it yet. Does it just take longer than normal ranks or someth
    15·2 answers
  • Between the div tags below, type the code for a link to the second.html page. Use "Go to the Second Page" as the link text
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!