Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package javaSyntaxix;
- import java.util.Scanner;
- public class DecimalToHexa {
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- int number = sc.nextInt();
- String hex = Integer.toHexString(number);
- System.out.println(hex.toUpperCase());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement