F Then I'm going to print a capital F just % 1f C to be aesthetically interesting equals another %.1fc.
然后我将打印大写字母,使其比较美观的,等于另一个。
In this case, I'm going to get back the answer 3 F-O-O because the user typed in F-O-O, but wait a minute, what's with this?
假若这样,我得到了答案3,因为用户输入了,等一下,用这个干吗?
Now, I'm on F here.
现在到F了
This time I'm not just saying --% 2f "%f" I'm actually saying % -- what -- %.2f.
这次我不只是讲“%f“,我要讲的是,%,--什么呢。
That's true, but especially because of my parenthesization 32 over here, because I'm saying, "Do f minus 32, but then multiply it by the division on the left."
是那样的,但是特别地,因为我这里加上了括号,因为我指明,“f减去,然后它乘以左边的那个除法的结果“
printf Well, notice I'm calling print F with percent C, and then I'm printing out each of these letters one at a time.
好的,请注意我用%c来调用,然后我打印出一个一个打印出这些字符。
Let me go ahead and call print F. I'm going to say A equals A and then I need a percent D, backslash, comma A; so this is a little bit of -- more syntax than would be nice, %d but I'm just saying, literally, A equals percent D, and I'm plugging in the value of A for percent D.
我们继续调用printf,我说明A等于,然后我需要%d,反斜杠n,逗号;,所以这个有点--偏向逻辑的,而不偏向美观的,但是我刚说了,字面上,A等于,我用%d插入了A的值。
应用推荐