第一个声明一个标识为a 的整型变量(int variable),第二个声明一个标识为mynumber 的浮点型变量(float variable)。声明之后,我们就可以在后面的程序中使用变量a和 mynumber 了。
基于2个网页-相关网页
The example in Listing 1 illustrates variable creation of a variety of types (int, float, string, array, and function).
清单1中的示例说明了如何创建多种类型的变量(整型、浮点、字符串、数组和函数)。
You can also declare a variable as a "Float", which means it can store numbers with decimal places.
你也可以定义一个实型变量,这就意味着它能存储小数位。
> David: At some point in time, I'm going to have to have declared the variable as a float before I can then hand it to printf as the insertion value for that format strength.
>,大卫:在一个特定的时间,我将需要,声明float类型这样的变量,那样我就可以把它打印出来,像是格式化优点的插入值。
I need to now put this float somewhere, and I'll put it in a variable called f that you can call it whatever you'd like.
我现在需要把这个浮点数放在哪个地方,然后我把它放在,一个叫做f的变量里,你也可以给这个变量取其它的你喜欢的名字。
And I'm storing the answer in a variable called "answer" that's of type float.
我把这个答案存储在一个float类型的,叫做“answer“的变量中。
应用推荐