萌新求助,可以帮忙修改一下或者写一段更明了的代码吗。谢谢各位。

一.问题
Write ONE C(也可是c++) Program to accomplish the following task: Convert a double number to its hexadecimal form.
Constraints:
(1) The double number x is located between 0 and 1000 (0 <= x < =1000), e.g. 678.345.
(2) The double number with the hexadecimal form contains 6 significant digits. e.g. “5D.32FA45”.
(3) The double number with the hexadecimal form is represented by a string (or a character array), e.g. “5D.32FA45”.

The possible steps are as follows:
1) Split a double number into the integer part and the fractional part;
2) Convert the integer part into its hexadecimal form;
3) Convert the fractional part into its hexadecimal form;
4) Combine both parts into a string;
最好有注释。。

https://www.chegg.com/homework-help/questions-and-answers/write-c-program-finish-following-requirements-convert-double-number-hexadecimal-form-1-dou-q41428969

之前遇到有人在这里提问我回答了,一转手到这个网站上卖答案赚差价,所以先采纳了再给你写