Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Java (http://www.go4expert.com/forums/java/)
-   -   Question about how to change my program to user change the input of rate by user (http://www.go4expert.com/forums/question-change-program-user-change-t28254/)

maxruas 24Apr2012 01:42

Question about how to change my program to user change the input of rate by user
 
Code:

/**
 * @(#)MathDemo.java
 *
 * MathDemo application
 *
 * @author
 * @version 1.00 2012/4/23
 */
//import java.util.Scanner;
public class MathDemo {

    public static void main(String[] args) {
                //rate is the value of hourly pay
        //        Scanner in = new Scanner(System.in);
            double rate = 80.00;
            System.out.println("value of rate is " + rate);

            //pay is value of weekly pay
            double pay = 40 * rate;
            System.out.println("the value of pay is " + pay);

            //anualPay is the value of a year's work
            int bonus = 100;
            double annualPay = pay * 12 + bonus * 12;
            System.out.println("annual salary is $ " + annualPay);


//sorry guys im lost on how I suppose to change rate to be input by the user pleeasy help //:)

    }
}



All times are GMT +5.5. The time now is 11:43.