Advertisement
Guest User

Untitled

a guest
Jan 25th, 2015
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3.  
  4. public class _05_DecimalToHexadecimal {
  5. public static void main(String[] args) {
  6. @SuppressWarnings("resource")
  7. Scanner str = new Scanner(System.in);
  8. int num = str.nextInt();
  9. //System.out.printf("%X", num);
  10. String hexNum = Integer.toHexString(num).toUpperCase();
  11. System.out.println(hexNum);
  12. }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement