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 do open online courses help with independent learning? (1 point)
Dominik [7]

I personally have online courses, A. seems like a fitting choice in my opinion. I hope this helps.

4 0
3 years ago
Read 2 more answers
Write a function called calculate() that accepts three integer Numbers as arguments, compute these values : Sum and Product and
Dmitrij [34]

Answer:

int* calculate(int a,int b,int c){

   int result[] = {0,0};

   int sum = a+b+c;

   int product = a*b*c;

   result[0] = sum;

   result[1] = product;

   return result;

}

Explanation:

The function is a block of the statement which performs the special task.

The function can return one integer, not more than one integer.

If we want to return multiple values then, we can use array.

we store the result in the array and return that array to the main function.

This is the only possible way to return multiple values.

So, define the function with return type array and declare the array with zero value.

Then, calculate the values and store in the variable after that, assign to the array.

Finally, return that array.  

5 0
3 years ago
Why is it a best practice of a remote access policy definition to require employees and users to fill in a separate VPN remote a
Anna007 [38]

Answer:

a.This helps with non-repudiation to ensure the user is who they claim to be and that they are authorized to access confidential organizational assets.

Explanation:

8 0
3 years ago
____ are programs that run independently and travel between computers and across networks.
fiasKO [112]
<span>Worms are programs that run independently and travel between computers and across networks.
</span>Those are malicious programs which are exploiting operating system vulnerabilities and by doing so they spread itself. They <span>self-replicate on computers or via computer networks without the user being aware.</span>
3 0
3 years ago
You have repaired a broken LCD panel in a laptop computer. However, when you disabled the laptop, you bent the hinge on the lid
Alex787 [66]
Yes it would take a second or todo
8 0
3 years ago
Other questions:
  • The World Wide Web consists of interconnected computer networks throughout the world that everyone can use. True or False
    13·2 answers
  • A job posting is the best way to find out what _____ are required for a position.A.aptitudes B.hard skills C.soft skills D.dress
    10·2 answers
  • A mobile device has stopped receiving automatic OS updates that until recently were pushed to the device.
    7·2 answers
  • What answer best explains why improper netiquette is considered dangerous? Individuals who violate user policies are often charg
    14·2 answers
  • The program used to create the file where you want to insert the object is called the ____.
    12·1 answer
  • how write a program to prompt the user for hours and rate per hour using input to computer gross pay Use 35 hours and rate2.75 p
    9·1 answer
  • Which part of a touchscreen responds to pressure applied to its surface?
    6·1 answer
  • Time
    6·1 answer
  • Is social media bringing people together or cause in sepretation?​
    11·2 answers
  • View One | View All
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!