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]
3 years ago
13

Compile and Execute a Program

Computers and Technology
1 answer:
ELEN [110]3 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
How many typefaces should you use in business documents?
Assoli18 [71]
It’s best to use two
5 0
3 years ago
Read 2 more answers
1. Describe the sequencing of factors influencing health status codes for patients that also have chronic conditions being manag
Vesnalui [34]
Bubyggyy tvtvtvttfrcrt
4 0
3 years ago
"A queue automaton is like a push-down automaton except that the stack is replaced by a queue. A queue is a tape allowing symbol
Yanka [14]

It is possible in this example to show that a language can be recognized by a deterministic queue automaton if the language is Turing-recognizable.

For computation, we first need to transfer the input string on queue. We do so by using right moves and pushing each read symbol. Then, we simulate the right move of TM with pull of the rightmost elements of the queue and pushing the new symbol according to transition function back to queue. On the other hand, the left reset of TM is simulated using pushing until we reach special symbol which denotes the left-hand end of tape. We push and pull until we are at the right position. Therefore, we can intuitively simulate left-reset Turing machines.

7 0
3 years ago
Productivity, rework, and technology impact are examples of which kind of software metric?
fgiga [73]

The correct answer should be process type of software metric. The process metrics are used to help in strategic decision making. The processes such as work products delivery, expended human hours and conformance to quality and schedule are all metrics in the process domain.

6 0
3 years ago
What allows you to navigate up, down, left and right in a spreadsheet?
Triss [41]
The formula bar......................
3 0
3 years ago
Other questions:
  • What feature is available to add a suggestion in the margin of someone else's document? Annotation Bookmark Comment Highlight
    7·2 answers
  • When creating an electronic slide presentation, Eliza should ensure that her presentation contains
    6·1 answer
  • If you want to copy a file from one folder to another , what would you do?
    15·1 answer
  • (Game Design) Which of the following is NOT a name of a popular digital sculpting application?
    13·1 answer
  • Give a logical expression with variables p,q, and r that is true if p and q are false and r is true and is otherwise false.
    5·1 answer
  • Which of the following regarding the Ames test is true? a. It is used to identify newly formed auxotrophic mutants. b. It is use
    14·1 answer
  • WHICH COMPUTER COMPONENT CONTAINS ALL THE CIRCUITRY NECESSARY FOR THE OTHER COMPONENTS OR DEVICES TO COMMUNICATE WITH ONE ANOTHE
    12·1 answer
  • Which of the following is productivity strategy for collaboration?
    6·1 answer
  • Which utility is used to transform a standalone Windows Server 2012 R2 system into an Active Directory domain controller?
    6·1 answer
  • Write a python program to find factorial, use exception handling and display an appropriate message if the user inputs alphabets
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!