#include<stdio.h>
#include<stdlib.h>
#include<time.h>
#include<iostream>
using namespace std;
int main(void)
{
time_t t;
int NumSuc=0;
int NumFail=0;
srand((unsigned) time(&t));
for(int i=0; i<10000; i++){
if((((float)(rand()%1000))/1000.0)<0.537){
cout<<"1";
NumSuc=NumSuc+1;
//cout<<((float)(rand()%1000))/1000.0<<endl;
}
else{
cout<<"0";
NumFail=NumFail+1;
}
}
/*cout<<endl;
cout<<(float)NumSuc/(float)(NumFail+NumSuc);
cout<<endl;*/
system("pause");
return 0;
}输出结果重定向之后怎么会这样
![](upload/attach/201202/336732_di5lph6b32xhpgg.jpg)
按理说
请按任意键继续
这句话应该在最后啊
[招生]系统0day安全班,企业级设备固件漏洞挖掘,Linux平台漏洞挖掘!