online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
import java.util.Scanner; public class Main { /** Calculates touch damage miss percentage rate with given variables. This should be accurate for all BBB versions. @author shot **/ //CHARACTER VARIABLE static int CHARACTER_LEVEL = 200; static int CHARACTER_BASE_AVOID = 100; static int CHARACTER_BUFFFED_AVOID = 0; static boolean IS_THIEF = false; //MONSTER VARIABLE static int MOB_LEVEL = 180; static int MOB_BASE_ACCURACY = 270; static int MOB_BUFFED_ACCURACY = 0; public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print("character level: "); CHARACTER_LEVEL = input.nextInt(); System.out.print("base avoid: "); CHARACTER_BASE_AVOID = input.nextInt(); System.out.print("avoid from buffs: "); CHARACTER_BASE_AVOID = input.nextInt(); System.out.print("is character thief? (true/false): "); IS_THIEF = input.nextBoolean(); System.out.print("mob level: "); MOB_LEVEL = input.nextInt(); System.out.print("mob base accuracy: "); MOB_BASE_ACCURACY = input.nextInt(); System.out.print("mob accuracy from buffs: "); MOB_BUFFED_ACCURACY = input.nextInt(); System.out.println("Chance for touch miss: " + getPDamageMiss() + "%"); } public static int getPDamageMiss() { int nEVA = CHARACTER_BASE_AVOID + CHARACTER_BUFFFED_AVOID; nEVA = Math.max(0, nEVA); nEVA = Math.min(999, nEVA); int nMobACC; if (CHARACTER_LEVEL >= MOB_LEVEL) { nMobACC = nEVA; } else { nEVA -= (MOB_LEVEL - CHARACTER_LEVEL) / 2; if (nEVA > 0) { nMobACC = nEVA; } else { nMobACC = 0; } } int nTotalMobACC = MOB_BASE_ACCURACY + MOB_BUFFED_ACCURACY; nTotalMobACC = Math.max(0, nTotalMobACC); nTotalMobACC = Math.min(999, nTotalMobACC); double nPerc = (double) nMobACC / ((double) nTotalMobACC * 4.5) * 100; if (IS_THIEF) { nPerc = Math.max(5.0, nPerc); nPerc = Math.min(95.0, nPerc); } else { nPerc = Math.max(2.0, nPerc); nPerc = Math.min(80.0, nPerc); } return (int) nPerc; } }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue