今天是第四天,学习内容如下:
1.逗号运算符,关系运算符,逻辑运算符
2.条件表达式
3.位运算
4.混合运算时数据类型的转换(隐式)(显式)
5.使用注释
6.写代码遇到错误要记下错误原因及自己的解决方法
7.今日代码:
int main()
{
/* std::cout << sizeof “C++”<<std::endl;
std::cout << “the long is” << sizeof(long) << “byte\n”<<std::endl;
unsigned int x;
unsigned int y = 100;
unsigned int z = 50;
x = y - z;
cout << “difference is” << x;
x = z - y;
cout << “now the difference is” << x; */
int a, b, x;
cout << "input the value of a:/n";
cin >> a;
cout << "input the value of b:/";
cin >> b;
x = (a - b) > 0 ? (a - b) : (b - a);
cout << "the difference of a and b is:\t\t" << x;
return(0);
}
今天又没学习多久,但我发现那个软件可以倍速播放,看来以后可以倍速来看快点,周末一定要多学点。