Finds your weekly pay

Finds your weekly pay - double hours = in.nextDouble();...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
/* * Finds your weekly pay. */ package weeklypay; import java.util.Scanner; /** * * @author Manny */ public class WeeklyPay { /** * @param args the command line arguments */ public static void main(String[] args) { System.out.println("Please enter the amount of hours you work: "); Scanner in = new Scanner(System.in);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: double hours = in.nextDouble(); double weeklySalary = 0; if (hours <= 40){ weeklySalary = 8.00 * hours;} else { weeklySalary = 320.00 + 12.00 * (hours - 40); } System.out.println("Your weekly salary is: " + weeklySalary + "Dollars."); } }...
View Full Document

This note was uploaded on 12/07/2011 for the course BUS 350 taught by Professor Leighjin during the Fall '11 term at S.F. State.

Ask a homework question - tutors are online