编辑代码

#include <iostream>
#include <string>
using namespace std;
#define day 7

int main() 
{
	cout << "我是你爹" << endl;
	int a=10;
	int b=20;
	int c=0;
	cout<<"a="<<a<<endl;
	cout<<"一周总共有"<<day<<"天"<<endl;
	//sizeof(数据类型/变量)
	char str1[]="hello world";
	cout<<str1<<endl;
	string str="hello world";
	cout<<str<<endl;
	bool flag=true;
	cout<<flag<<endl;
	flag=false;
	cout<<flag<<endl;
	cout<<"请输入字符串型变量:"<<endl;
	cout<<a--<<endl;
	cout<<a<<endl;
	cout<<(10/3)<<endl;
	c=a>b?a:b;
	cout<<c<<endl;
// 	int RandomNumber;
// 	srand((unsigned)time(NULL));
// 	RandomNumber = rand()%100;
// 	cout<<RandomNumber<<endl;
cout<<sizeof(str1)<<endl;
int arr[10] = { 1,2,3,4,5,6,7,8,9,10 };
cout<<arr<<endl;
int len=sizeof(arr)/sizeof(arr[0]);
cout<<len<<endl;
}