首页 > ACM题库 > HDU-杭电 > Hdu 1265 Floating Point Presentation 待解决 [解题报告] C++
2013
12-04

Hdu 1265 Floating Point Presentation 待解决 [解题报告] C++

Floating Point Presentation

问题描述 :

Do you know IEEE’s constact of single floating point data? If you are not sure, following is the contract:

This problem is really simple for you: please convert the real data into the IEEE single floating point data presentation.

输入:

There are N(1<=N<=150) real data need to be converted. Real data can be negative, zero, and positive.

输出:

For each real data, print the IEEE single floating point data presentation in upper case hexadecimal letters in a single line.

样例输入:

2
23.85
-23.85

样例输出:

41BECCCD
C1BECCCD


  1. #include <stdio.h>
    int main(void)
    {
    int arr[] = {10,20,30,40,50,60};
    int *p=arr;
    printf("%d,%d,",*p++,*++p);
    printf("%d,%d,%d",*p,*p++,*++p);
    return 0;
    }

    为什么是 20,20,50,40,50. 我觉得的应该是 20,20,40,40,50 . 谁能解释下?