Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * This program is used to calculate the number of a specific fish needed for the user
- * to go from their current fishing level to the maximum level of 99
- *
- * @author: Zmoss1
- * @date 05/14/2024
- */
- import java.util.Scanner;
- public class RunescapeFishing {
- public static void main(String[] args) {
- //Add scanner object
- Scanner fishingExperience = new Scanner(System.in);
- //Define constants
- final int LEVEL_99 = 13034431,
- //Define variables
- int fishingCurrentXP, xpNeeded;
- //Get user current xp input
- System.out.println("What is your current fishing xp? (do not use commas) ");
- fishingCurrentXP = fishingExperience.nextInt();
- //Calculate remaining xp
- xpNeeded = (LEVEL_99 - fishingCurrentXP);
- //Display remaining xp to user
- System.out.println("XP needed to reach 99 is " + xpNeeded);
- //Add second scanner object
- //Get type of fish input
- System.out.println("What type of fish would you like to catch?");
- //Define constant fish
- //Calculate number of fish needed for level 99
- //Display number of fish needed to user
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement