Sunday, March 14, 2021

1.17. Write a program that read any hexadecimal number and display equivalent decimal number.

#include<stdio.h>
#include<conio.h>
void main()
{
int n;
clrscr();
printf("Enter any hexadecimal number: "):
scanf("%x", &n);
printf("Equivalent decimal number is: %d.", n);
getch ();
}

No comments:

Post a Comment