For those with a java IDE... enjoy
Brief explanation
Answer what kind of gp you are exchanging for (07/rs3)
Answer how much of the gp you have to exchange for your desired gp
Answer 07 price/m
Answer RS3 price/m
Brief explanation
Answer what kind of gp you are exchanging for (07/rs3)
Answer how much of the gp you have to exchange for your desired gp
Answer 07 price/m
Answer RS3 price/m
Code:
import java.util.Scanner;
public class RSConvert
{
public static void main(String[] args)
{
Scanner input = new Scanner(System.in);
System.out.print("Which gp do you wish to exchange for? (07/rs3): ");
String currency = input.next();
double amount = 0;
if(currency.equalsIgnoreCase("07"))
{
System.out.print("How much RS3 mills do you have to exchange?: ");
amount = input.nextDouble();
}
else if(currency.equalsIgnoreCase("rs3"))
{
System.out.print("How much 07 mills do you have to exchange?: ");
amount = input.nextDouble();
}
System.out.print("Enter RS3 price per mill: ");
double rs3Price = input.nextDouble();
System.out.print("Enter 07 price per mill: ");
double oldSchoolPrice = input.nextDouble();
double conversionRateRS3 = rs3Price/oldSchoolPrice;
double conversionRate07 = oldSchoolPrice/rs3Price;
System.out.print("\nHow much 07gp an RS3 mill is worth -- ");
System.out.printf("%1$.2f", conversionRateRS3);
System.out.println("m");
System.out.print("How much RS3gp an 07 mill is worth -- ");
System.out.printf("%1$.2f", conversionRate07);
System.out.println("m\n");
if(currency.equalsIgnoreCase("07"))
{
System.out.print("Amount of 07gp you should get for your " + amount + "m RS3 gp -- ");
System.out.printf("%1$.2f", amount*conversionRateRS3);
System.out.println("m");
}
else if(currency.equalsIgnoreCase("rs3"))
{
System.out.print("Amount of RS3gp you should get for your " + amount + "m 07 gp -- ");
System.out.printf("%1$.2f", amount*conversionRate07);
System.out.println("m");
}
}
}
















