#include <iostream>
#include <cstring>
using namespace std;
int main_day2()
{
short num1 = 10;
int num2 = 100;
long num3 = 1000;
long long num4 = 10000;
cout << num1 << endl;
cout << num2 << endl;
cout << num3 << endl;
cout << num4 << endl;
cout << "int占用的内存空间为: " << sizeof(int) << "字节" << endl;
cout << "num3占用的内存空间为: " << sizeof(num3) << "字节" << endl;
cout << "num4占用的内存空间为: " << sizeof(num4) << "字节" << endl;
cout << "\n" << endl;
float numble1 = 3.14f;
double numble2 = 3.14159265358979;
cout << numble1 << endl;
cout << numble2 << endl;
cout << "float占用的内存空间为: " << sizeof(float) << "字节" << endl;
cout << "double占用的内存空间为: " << sizeof(double) << "字节" << endl;
cout << "\n" << endl;
char ch = 'a';
cout << ch << endl;
cout << "char占用的内存空间为: " << sizeof(char) << "字节" << endl;
cout << "\n" << endl;
cout << "a\tHelloWorld\n" ;
cout << "aa\tHelloWorld\n" ;
cout << "aaa\tHelloWorld\n";
cout << "aaaa\tHelloWorld\n";
cout << "\n" << endl;
char HelloWorld1[] = "HelloWorld";
string HelloWorld2 = "HelloWorld";
cout << HelloWorld1 << endl;
cout << HelloWorld2 << endl;
cout << "\n" << endl;
bool flag = true;
cout << flag << endl;
flag = false;
cout << flag << endl;
cout << "bool占用的内存空间为: " << sizeof(bool) << "字节" << endl;
cout << "\n" << endl;
int a = 0;
cout << "请输入整型变量a的值:";
cin >> a;
cout << "a = " << a << endl;
float b = 0.0f;
cout << "请输入浮点型变量b的值:";
cin >> b;
cout << "b = " << b << endl;
char c = 0;
cout << "请输入字符型变量c的值:";
cin >> c;
cout << "c = " << c << endl;
string s = "";
cout << "请输入字符串型变量s的值:";
cin >> s;
cout << "s = " << s << endl;
bool d = false;
cout << "请输入布尔型变量d的值:";
cin >> d;
cout << "d = " << d << endl;
cout << "\n" << endl;
system("pause");
return 0;
}