This commit is contained in:
Light-City
2020-04-06 00:57:02 +08:00
parent f97c156cc4
commit a4d828bb4c
120 changed files with 4413 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
#include<iostream>
using namespace std;
int main(int argc, char const *argv[])
{
int i,j,k,f;
for (i=1;i<=4;i++){
for (j=1;j<=30;j++)
cout<<" ";
for (k=1;k<=8-2*i;k++)
cout<<" ";
for (f=1;f<=2*i;f++)
cout<<'*';
cout<<endl;
}
for(i=1;i<=3;i++){
for (j=1;j<=30;j++)
cout<<" ";
for (f=1;f<=7-2*i;f++)
cout<<'*';
cout<<endl;
}
system("pause");
return 0;
}

View File

@@ -0,0 +1,20 @@
#include<iostream>
using namespace std;
int main(int argc, char const *argv[])
{
int year;
bool isLeapYear;
cout<<"Enter the year: ";
cin>>year;
isLeapYear = (((year%4==0)&&(year%100!=0))||(year%400==0));
if(isLeapYear)
{
cout<<year<<" is a leap year"<<endl;
}
else
{
cout<<year<<" is not a leap year"<<endl;
}
system("pause");
return 0;
}

View File

@@ -0,0 +1,16 @@
#include<iostream>
һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>ע<EFBFBD><EFBFBD>
//<2F><>һ<EFBFBD><D2BB>ע<EFBFBD>ͷ<EFBFBD><CDB7><EFBFBD>
#if 0
asd
#endif
//<2F><><EFBFBD><EFBFBD>ע<EFBFBD><D7A2>
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8>
#if 1
asData
#endif

View File

@@ -0,0 +1,18 @@
#include<iostream>
using namespace std;
//<2F><>ͬ<EFBFBD><CDAC><EFBFBD>ڴ<EFBFBD><DAB4><EFBFBD>ַ
union myun
{
struct { int x; int y; int z; }u;
int k;
}a;
int main()
{
a.u.x =4;
a.u.y =5;
a.u.z =6;
a.k = 0; //<2F><><EFBFBD>ǵ<EFBFBD><C7B5><EFBFBD>һ<EFBFBD><D2BB>int<6E>ռ<EFBFBD>ֵ
printf("%d %d %d %d\n",a.u.x,a.u.y,a.u.z,a.k);
system("pause");
return 0;
}