Itssuman1808

Program to Display hexadecimal, decimal, octal number format

Sep 3rd, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.32 KB | None | 0 0
  1. // Program to Display hexadecimal, decimal, octal number format of the entered numbers.
  2. #include<stdio.h>  
  3. void main()
  4. {
  5. int num;    //coded by Suman Maji
  6. printf("Enter the number : ");
  7. scanf("%d",&num);
  8. printf("\nDecimal format : %d",num);
  9. printf("\nHexaDecimal format : %x",num);
  10. printf("\nOctal format : %o",num);
  11. }
Add Comment
Please, Sign In to add comment