ITSA Basic 题目2 英哩转公里 (Java)

题目:英哩转公里
说明:输入一个英哩整数,并转成公里显示,并且格式为显示一个小数。

import java.util.Scanner;public class Main {public static void main(String[] args) {Scanner sc = new Scanner(System.in);while(sc.hasNext()) {int input = sc.nextInt();System.out.printf("%.1f\n", input * 1.6);}}}

关于作者: 网站小编

码农网专注IT技术教程资源分享平台,学习资源下载网站,58码农网包含计算机技术、网站程序源码下载、编程技术论坛、互联网资源下载等产品服务,提供原创、优质、完整内容的专业码农交流分享平台。

热门文章