Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- import java.lang.*;
- public class TestTimeSheet {
- /**
- * @param args
- */
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- /*String s1 = "John, Susie, Mark, Jack, Jill";
- String [] charArray;
- charArray = s1.split(",");
- System.out.println(charArray[1]);*/
- Scanner input = new Scanner(System.in);
- //==========================================
- int location;
- double rate;
- String times[] = new String[15];
- times = input.nextLine().replace(" ", "").split(",");
- location = Integer.parseInt(times[0]);
- //if ( (100 <= location) && (location <= 199) ) {
- // rate = 10.0;
- // else if ()
- if(location >= 500)
- rate = 8.0;
- else if (location >= 400)
- rate = 13.50;
- else if (location >= 300)
- rate = 9.25;
- else if (location >= 200)
- rate = 9.25;
- else if (location >= 100)
- rate = 10;
- for(int i = 0; i < times.length; i++) {
- //System.out.print(" " + times[i]);
- //System.out.println(i + ":" + times[i]);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment