tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 deletions
|
|
@ -0,0 +1,11 @@
|
|||
public static void main(String args[]){
|
||||
for(int a= 0;a < 33;a++){
|
||||
System.out.println(Integer.toBinaryString(a));
|
||||
System.out.println(Integer.toOctalString(a));
|
||||
System.out.println(Integer.toHexString(a));
|
||||
//the above methods treat the integer as unsigned
|
||||
//there are also corresponding Long.to***String() methods for long's.
|
||||
|
||||
System.out.printf("%3o %2d %2x\n",a ,a ,a); //printf like the other languages; binary not supported
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue