Compare commits

..

No commits in common. '5af67a084943b20be2baa645c473fd36401b4216' and 'a2b197f45aafebc07cf1cdc6e6c49994b13d920b' have entirely different histories.

@ -1,13 +1,13 @@
public class jinzhi {
public static void main(String[] args) {
int a = 15;
int x = 0;
int n = 0;
int i=0;
while (a > 0) {
x = (int) (x + (a % 2) * Math.pow(10,i));
n = (int) (n + (a % 2) * Math.pow(10,i));
a = a / 2;
i=i+1;
}
System.out.print("jinzhi11111十进制a转换二进制x为" + x);
System.out.print("jinzhi十进制a转换二进制n为" + n);
}
}
Loading…
Cancel
Save