Professional Documents
Culture Documents
Lab 4
Lab 4
Submit the source files you wrote, and the screenshot of the results, to TA
through DingTalk message.
(Please create a zip file containing the C files and screenshot, filename format:
“student number + name.zip”)
interger
0 10 16 160 -1 -2 -160
number
hex number
Also, think about another question. Is there any difference between the hex
format of positive and negative numbers? If yes, try to figure out the principles
of converting a negative number to its hex format, and write it down in your
report.
Part 2: Simple Arithmetic
Write a C program which can accept input of two integer numbers from the user,
and then add them up, show the result on the screen.
(Operation tips should be provided as guidance of the program)
Example output: