Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class sensFinder {
- public static Scanner scan = new Scanner(System.in);
- public static double first;
- public static double low;
- public static double high;
- public static void main(String[] args) {
- System.out.println("Start by finding our starting point");
- System.out.println("To do this, find the sensitivity you need to do a full 360");
- System.out.println("while also using your entire surface");
- System.out.println("What is this starting number?");
- first = scan.nextDouble();
- for (int i = 0; i < 5; i++) {
- low = first*0.5;
- high = first*1.5;
- System.out.println("Now, try a sensitivity of a: "+low);
- System.out.println("Then b: "+high);
- System.out.println("Which do you prefer, a or b?");
- String check = scan.next();
- if (check.equalsIgnoreCase("a")) first = (first + low)/2;
- if (check.equalsIgnoreCase("b")) first = (first + high)/2;
- }
- System.out.println("");
- System.out.println("Your final sensitivity is: "+first);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement