Advertisement
M_Andreev

DecimalToHexadecimal

Sep 7th, 2014
289
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.27 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class _05_DecimalToHexadecimal {
  4.     public static void main(String[] args) {
  5.         Scanner sc = new Scanner(System.in);
  6.         System.out.print("Enter number: ");
  7.         int num1 = sc.nextInt();
  8.        
  9.         System.out.printf("Hexadecimal: %X", num1);
  10.     }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement