I'm a Java beginner, i'm writing a simple program to convert pounds to euros, but i would like the output answer to be rounded up to 2 significant figures, can anybody help. here is the code
import java.util.Scanner;
public class EuroConversion {
public static void main(String[] args) {
Scanner input = new Scanner (System.in);
System.out.println("Enter the amount of pounds to convert");
float money = input.nextInt();
double convertion = money * 1.14;
System.out.println("The convertion is " + convertion + " Euros");
}
}
Thanks for any help.