Question:Easy way to convert decimal number to hexadecimal number 

Answer 
#include<stdio.h>
int main(){

  long int decimalNumber;

  printf("Enter any decimal number: ");
  scanf("%d",&decimalNumber);

  printf("Equivalent hexadecimal number is: %X",decimalNumber);

  return 0;
}
Sample output: Enter any decimal number: 45 Equivalent hexadecimal number is: 2D 

+ Report
Total Preview: 430
Easy way to convert decimal number to hexadecimal number
Copyright © 2024. Powered by Intellect Software Ltd