题解 | #简单运算#

简单运算

http://www.nowcoder.com/practice/6817945637dd4a31811d38313653e967

import java.util.Scanner;

public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int a = scanner.nextInt(); int b = scanner.nextInt(); scanner.close(); int shu1=a+b; int shu5=a*b; int shu2,shu3,shu4; if(a>b){ shu2=a-b; shu3=a/b; shu4=a%b; } else{ shu2=b-a; shu3=b/a; shu4=b%a; } System.out.print(shu1+" "+shu2+" "+shu5+" "+shu3+" "+shu4); //write your code here......

}

}

全部评论

相关推荐

10-25 23:12
门头沟学院 Java
点赞 评论 收藏
分享
评论
点赞
收藏
分享
牛客网
牛客企业服务