Hello there
i was wondering if someone is able to help me,
im kinda trying to make converter between 2 parameters which the user need to type,
and compare them ,same about the amount (the user needs to insert that parameter (the amount of the value))
im kinda getting confused how to write it right, i've made a start and not sure how to continue it, and i would gladly take any offers
suggestion about it
Thanks
import java.util.*; public class Converter { static Scanner reader=new Scanner (System.in); public static void main (String[]args) { int amount=0, insertGold, insertCPs; double cpsPrice, goldPrice; System.out.println("What do you want to convert (cps silver)"); int cp=reader.nextInt(); int silver=reader.nextInt(); if ((silver==1)&&(cp==0)) System.out.println("Type in the amount of the silver that u want to convert into cps"); insertGold=reader.nextInt(); System.out.println("Type in the amount of the cps that u want to buy"); insertCPs=reader.nextInt(); if ((silver==0)&&(cp==1)) System.out.println("Type in the amount of the cps that u want to convert into silver"); insertCPs=reader.nextInt(); System.out.println("Type in the amount of the silver that u want to buy"); insertGold=reader.nextInt(); } }
Yeah as you can see ima newbie
i was thinking maybe it's possible to make boolean access to those ifs...