第一天
对照着老师给的示例程序写出了hello world超级开心~然后莫名其妙的遇到一个情况,在写了using namespace std的情况下,cin cout仍然无法为vs c++识别,最后那道题选择用printf了但不太明白还有哪里可能有问题。自习最后尝试使用了一下条件语句,可惜没有成功。
第二天
第一天想能不能用英文学习编程,所以下面是第一天遇到的一些语句,全称和含义如下:
int: integer
std :standard
iostream :standard input/output streams library
%d%d :used for a placeholder of an integer. %i also works for an integer, %c is a character, and %s is string.
%d\n : http://www.cplusplus.com/reference/cstdio/printf/
endl :endline
char: character
void main():仍不知道干嘛用的……好像这样不用写return0了
ceil() : ceiling, the inner surface of the top part of the room
floor(): just floorXD
第三天,课上讲到数据类型,资料和问题如下
hex:hexadecimal,十六进制
dec:latin decem,十进制输出
oct:latin octo,八进制
float的存储方式:
浮点数a=s*m*b^e
s=符号位m=基数位(小数部分)e=指数位
由于其使用科学计数法,首位(即唯一的整数位)为1,省去此位,多出一个储存空间
所储存的指数位并非真实指数,e=E(一个固定值,与类型有关)-所储存的指数位
储存内容为:符号位+E(E=(化科学计数法是向左移动的数位e+127)转二进制)+基数位去掉首位1,再补0至23位
?float中0如何表示