首页 > 其他 > 详细

求两点间的距离

时间:2017-09-18 12:55:51      阅读:287      评论:0      收藏:0      [点我收藏+]

//P60   2.6

import java.util.Scanner;
public class Demo_1{
    public static void main(String[] agrs) {
        Scanner input = new Scanner(System.in);
        System.out.("Enter a number 0 and 1000: ");
        int number = input.nextInt();
        int a = number%10;
        int b = number/10;
        int c = number/100;
        
        int sum = a + b + c;
        System.out.println("The sum of the digits is " + sum );
    }
}

求两点间的距离

原文:http://www.cnblogs.com/foreminent/p/7542477.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!