package main;
import java.util.Random;
import javax.swing.JOptionPane;
public class main {
public static void main(String [] args){
double sday = 1000000;
Random rm = new Random();
int xday = rm.nextInt(1000000) + 500000;
double inf = 0;
System.out.println("Money: " + xday);
while(Integer.parseInt(JOptionPane.showInputDialog("1 or 0")) == 1){
int WhitePotion = 1200;
inf = xday/sday;
System.out.println(inf + ":" + xday + "/" + sday);
WhitePotion = (int) (WhitePotion * inf);
System.out.println(WhitePotion);
xday = xday - (Integer.parseInt(JOptionPane.showInputDialog("How many WhitePotion do you want to buy?")) * WhitePotion) + rm.nextInt(100000);
System.out.println("Money: " + xday);
}
}
}
//Simulates Infaltion with WhitePotion