Answer to Question #45397 in Java | JSP | JSF for fel

Question #45397
Some while ago, the European Union decreed that all traders in in the UK sell their goods by the kilo and not by the pound (1 kilo = 2.2 pounds). The following pseudo code has been arrived at in order to carry out this conversion:
BEGIN
DISPLY prompt for value in pounds
ENTER value to old value + 2.2
DISPLAY value in kilos
END

Implement this program, remembering to declare any variables that are necessary.

JAVA programming
1
Expert's answer
2014-08-27T09:46:22-0400
import java.util.Scanner;
public class Convertor {
public static void main(String[] agrc) {
Scanner sc = new Scanner(System.in);
System.out.println("Please enter the values in pounds");
double pounds = sc.nextDouble();
System.out.println("Value in kilos " + pounds/2.2);
}
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS