2.4(将磅转换为千克)编写程序,将磅数转换为千克数。程序提示用户输入磅数,然后转换成千克并显示结果。1磅等于0.454千克。
下面是一个运行示例:
Enter a number in pounds:55.5
55.5 pounds is 25.197 kilograms
2.4(convert pounds to kilograms) Write a program that converts pound to kilogram.The program prompts the user to enter a number in pound, converts it to kilogram, and displays the result. one pound is 0.454 kilograms.
Here is a simple run:
Enter a number in pounds:55.5
55.5 pounds is 25.197 kilograms
下面是参考答案代码:
import java.util.