mirror of
https://github.moeyy.xyz/https://github.com/TheAlgorithms/C.git
synced 2023-10-11 15:56:24 +08:00
updated with the suggested changes
This commit is contained in:
parent
19fb5ba4dd
commit
e2444cee18
@ -5,11 +5,11 @@
|
|||||||
* return a string hexadecimal value after conversion
|
* return a string hexadecimal value after conversion
|
||||||
* @author [Rachit Bhalla](https://github.com/rachitbhalla)
|
* @author [Rachit Bhalla](https://github.com/rachitbhalla)
|
||||||
*/
|
*/
|
||||||
#include <assert.h>
|
#include <assert.h> // for assert
|
||||||
#include <math.h>
|
#include <math.h> // for pow function
|
||||||
#include <stdio.h>
|
#include <stdio.h> // for scanf and printf functions
|
||||||
#include <stdlib.h>
|
#include <stdlib.h> // for malloc and free functions
|
||||||
#include <string.h>
|
#include <string.h> // for strcmp function
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Convert octal number to decimal number
|
* @brief Convert octal number to decimal number
|
||||||
@ -66,7 +66,7 @@ int main()
|
|||||||
|
|
||||||
// Calling the function octalToHexadecimal
|
// Calling the function octalToHexadecimal
|
||||||
char *hexadecimalValue = octalToHexadecimal(octalValue);
|
char *hexadecimalValue = octalToHexadecimal(octalValue);
|
||||||
printf("\nEquivalent hexadecimal number is: %s", hexadecimalValue);
|
printf("Equivalent hexadecimal number is: %s", hexadecimalValue);
|
||||||
free(hexadecimalValue);
|
free(hexadecimalValue);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user