/*程序员龚猛,求整数各个位上的和*/

import java.util.Scanner;

public class Helloworld
{

public static void main(String[] args)
 
 {
  
    Scanner input=new Scanner(System.in);
         System.out.print("Enter a number 0 and 1000 :");
         int number =input.nextInt();
         int bit=number%10;
         number=number/10;
         int ten=number%10;
         number=number/10;
         int kil=number%10;
         System.out.println("The sum of the digits is "+(bit+ten+kil))  

}

}

/*程序员龚猛,两点的距离*/

package HelloWorld;
import java.util.Scanner;
public class HelloWorld {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);

System.out.print("输入x1和y1:");
double x1 =input.nextDouble();
double y1 =input.nextDouble();

System.out.print("输入x2和y2:");
double x2 =input.nextDouble();
double y2 =input.nextDouble();

double x =Math.pow((x2 - x1),2);
double y =Math.pow((y2 - y1),2);

System.out.println("两个点之间的距离是:"+ Math.pow((x+y),0.5));
  }
}

最新文章

  1. 对Golang的一些看法
  2. python 处理中文文件时的编码问题,尤其是utf-8和gbk
  3. centos mysq table is read only
  4. laraval框架model注意事项
  5. poj 3207 2-SAT问题
  6. Facebook的手游出海之道
  7. 『局域网安全』利用ARP欺骗劫持Cookie
  8. 学php之翻译wordpress(2)
  9. JAVA的class打包成dll
  10. 重新想象 Windows 8 Store Apps (9) - 控件之 ScrollViewer 基础
  11. Linux基础之常用命令整理(一)
  12. Django 信号、中间件、i18n 专题
  13. Windows下 OpenSSL DES加密配置
  14. idea vue.js插件安装
  15. node.js依赖express解析post请求四种数据格式()
  16. mui---获取入口文件对象
  17. Liunx clear
  18. 【转载】.NET/C#-uploadify视频文件or大文件上传
  19. 【LinuxC】GCC编译C程序,关闭随机基址
  20. WhyDX9:翻写D3D红龙书中的程序

热门文章

  1. sqlmap基础入门超详细教程
  2. RT-SA-2019-005 Cisco RV320 Command Injection Retrieval
  3. 计算机视觉学习记录 - Implementing a Neural Network from Scratch - An Introduction
  4. python模块 - pywinauto(windows自动化安装软件)
  5. pythonのdjango
  6. PHP 【三】
  7. Alpha 冲刺 (9/10)
  8. 小程序引入百度api天气预报
  9. 论文阅读 | A Curriculum Domain Adaptation Approach to the Semantic Segmentation of Urban Scenes
  10. Win10安装java环境