⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cout the week.txt

📁 是一个用于星期输出的小程序
💻 TXT
字号:
#include   <iostream>   
#include   <cstdlib>       
using   namespace   std;
int main()
{   
	int i,sum = 0;
	for(i = 1;i<= 10;i++)
	 sum += i;
 cout<<sum;
              
        
    system("PAUSE");   
    return 0;   
}


#include   <iostream>   
#include   <cstdlib>       
using   namespace   std;
int main()
{   
	int i;
	cin>>i;
	switch(i)
	{
	case 0:
		cout<<"星期日";break;
	case 1:
		cout<<"星期一";break;
	case 2:
		cout<<"星期二";break;
	case 3:
		cout<<"星期三";break;
	case 4:
		cout<<"星期四";break;
	case 5:
		cout<<"星期五";break;
	case 6:
		cout<<"星期六";break;
	default:
		cout<<"input is wrong!";
	}
              
        
    system("PAUSE");   
    return 0;   
}


#include   <iostream>   
#include   <cstdlib>       
using   namespace   std;
int main()
{   
	int i;
	cin>>i;
	if(i >=0 && i <= 6)
	(if(i != 6)
	cout<<"星期"<<i + 1;
	else
		cout<<"星期日";  )   
    system("PAUSE");   
    return 0;   
}








#include   <iostream>   
#include   <cstdlib>   
using   namespace   std;   
int main()
{   
    int x,y,z;
	char s[3] = {'X','Y','Z'};
    for (x=0;x<=2;x++)
        for (y=0;y<=2;y++)
            for (z=0;z<=2;z++)
                if(x!=0&&(z == 0|| z == 2)&&x!=y&&y!=z&&x!=z)
                  {
                   cout<<"A"<<s[x]<<endl
                       <<"B"<<s[y]<<endl
                       <<"C"<<s[z]<<endl;
                   cout<<"这是组合之一"<<endl; 
                   }
     
    system("PAUSE");   
    return 0;   
}


#include   <iostream>   
#include   <cstdlib>   
using   namespace   std;   
int main()
{   
    int x,y,z;
	char s[3] = {'X','Y','Z'};
    for (x=1;x<=3;x++)
        for (y=1;y<=3;y++)
            for (z=1;z<=3;z++)
                if(x!=1&&(z == 1|| z == 3)&&x!=y&&y!=z&&x!=z)
                  {
                   cout<<"A"<<s[x - 1]<<endl
                       <<"B"<<s[y - 1]<<endl
                       <<"C"<<s[z - 1]<<endl;
                   cout<<"pause!"<<endl; 
                   }
     
    system("PAUSE");   
    return 0;   
}


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -