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 file extension for an MS Excel spreadsheet is ______.<br><br> avi or xls
anygoal [31]
XLS would be it, avi contains like sounds and stuff
6 0
3 years ago
Read 2 more answers
Windows needs free space on the hard drive for normal operation, for defragmenting the drive, for burning CDs and DVDs, and for
REY [17]

Answer:

True

Explanation:

Windows writes temporary files to the hard disk which it uses as a cache during normal operation. These files are usually deleted automatically after the windows operation has been completed. If there is no free disk space available, some windows operations will fail to start and others will stop working

3 0
2 years ago
Interviews should never feel like an_________Instead, they should feel like a________
Rainbow [258]

Answer:

blank 1: interrogation

blank 2: getting to know

Explanation:

4 0
3 years ago
The word blog is made from what two terms?
mafiozo [28]
• web + log = blog •
3 0
3 years ago
How does sugar dissolve in water ? &amp; Read Carefully ?
Degger [83]
Depends

such as if the molecule in the water is hot then the molecules of the sugar would dissolve faster since the hot water speeds the process.

Cold water molecules would be slower since of course its slows down the reaction when sugar is applied.
8 0
3 years ago
Other questions:
  • A Trojan horse is a program that copies itself repeatedly using up resources and potentially shutting down a network. true or fa
    11·1 answer
  • Which is the last step in conducting a URL search?
    6·1 answer
  • Absolute time would be most similar to :
    9·1 answer
  • The term used to describe the shape and layout of a computer component such as a motherboard or hard drive is __ factor?
    14·1 answer
  • The _____ class can be used to get user input using dialog boxes.
    14·1 answer
  • Which of the following is the correct financial function that returns the periodic payment for a loan?
    10·1 answer
  • William is an HR manager in a textile-manufacturing firm. He is creating a file on the hours each employee worked during the las
    6·2 answers
  • You are given a 5-letter word (for example, abcde). Write a C-Program which outputs all possible unique 5 letter permutations of
    13·1 answer
  • Wanna song to vibe to? Listen to Streets by Doja cat
    11·1 answer
  • What are the disadvantages of using grid analysis to help make decisions?
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!