万水千山走过

导航

2020年2月11日 #

十进制转为二、八、十六进制(两种方法:栈和比较法)。

摘要: public class PracticeDemo { //十进制转二进制 public static void Binary(int x) { int c = x;//为第二种方法先把x值预存起来 //方法一: Stack stack = new Stack(); while(x > 0) { s 阅读全文

posted @ 2020-02-11 18:37 万水千山走过 阅读(917) 评论(0) 推荐(1) 编辑

有规律分数求和!

摘要: public class PracticeDemo { public static void main(String[] args) { int fenzi = 2; int fenmu = 1; int sum = 0; int temp = 0; int n = 0;//计数器 System.o 阅读全文

posted @ 2020-02-11 13:57 万水千山走过 阅读(257) 评论(0) 推荐(0) 编辑