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

📄 suijihashu.txt

📁 随即函数 是个产生随即函数的代码 随即函数数 不是真正的随即的 是伪随即的 是我们写很多东西都需要的的函数
💻 TXT
字号:
#include<iostream.h>
#include<ctime>
#include <process.h> 
#include<stdlib.h> 
//using namespace std;
int a[77];
int b[45];
//////
void shuiji()
{
	srand((unsigned)time(NULL));
	for(int j=0;j<10;j++)
	{
		
		a[j]=rand()%12;
		cout<<a[j]<<endl;
	}
}
///////
void jishi()
{
	  time_t  currentTime;   
      currentTime=time(0);   
      while(currentTime+5 > time(0));
}
////////
void panduan()
{
	for(int m=0;m<10;m++)
	{
		
		if(b[m]!=a[m])
		{
			cout<<"失败!"<<endl;
			break;
		}
		if(b[m]==a[m])
		{
			continue;
		}
		cout<<"你是才子哦!"<<endl;

	}
	
}
////////

int main()
{ 
	shuiji();
	jishi();
    system("cls");
    for(int i=0;i<10;i++)
	{
	  cin>>b[i];
	}
   panduan();
   for(int n=0;n<10;n++)
   {
	  cout<<a[n]<<endl;
   }
}

⌨️ 快捷键说明

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