374226890
374226890
关注数: 2
粉丝数: 4
发帖数: 191
关注贴吧数: 17
新人贴,有哪位大神帮我一下下这个作业,看不懂啊 create variables for the largest and smallest short, int, and long, both signed and unsigned. Compute the largest and smallest number using pow(), which is in the cmath library, and sizeof() for the specific type, and assign it to its corresponding variable. (You do not need to use pow to computer the minimum unsigned number, as that is just zero!). The sizeof() function returns the number of bytes used by the type supplied to the function. You can use this function by passing the type as an argument, i.e. sizeof(float), sizeof(int), etc. Print the calculated values for these variables. Make sure these numbers match the numbers printed from the macros!!! Now, add one to each signed and unsigned maximum variable, and print the new value of the variables. What do you notice? In this same program, prompt the user for a character. Print the character entered back to the user as a character and the ASCII value for the character as a decimal, binary, and hexadecimal.
1
下一页