Hey guys, I just got back into java after taking a class on it in high school 2 years ago. I'm trying to make this simple program that tells you in how many hours you'll reach your desired level in an MMORPG. So far my code looks like this:
import java.util.Scanner; public class enter { public static void main(String[] args) { double ExpToLevel; double ExpPerHour; double time; Scanner input = new Scanner(System.in); System.out.println("Enter your experience until level up"); ExpToLevel = input.nextInt(); System.out.println("How much experience do you get an hour?"); ExpPerHour = input.nextInt(); ExpToLevel / ExpPerHour = time; System.out.println("You'll reach your level in " + time); } }
It's telling me the equation is an unexpected type. How do I fix this problem?


LinkBack URL
About LinkBacks
Reply With Quote
is nice to see someone else using an mmorpg to make one of their first programs too and i used scanner for mine too...should be time = then your equation like junky said