新冠美国疫情代码

```

#include

#include

int main(){

int S1=330000000;

int S=330000000;

int day=1;

int I=34;

int E=65;

int R=0;

float d=1.0/4;

float  d3=40;

float w=0;

float re=0.7;

float ri=0.7;

int dS,dE,dI,dR;

float p=0.001;

float dp;

while(day<1000&&S>0){

day++;

if(day>=40){

dp=0;

p=1-d/re;

}

else

dp=(1-p)*(1-p)/36;

if(day>=80&&d3>10){

d3=d3-0.2;

}

dS=-(w*I*ri+(1-p)*E*re)*(float)S/S1;

dE=w*I*ri+(1-p)*E*re-E*d;

dI=d*E-I/d3;

dR=I/d3;

S=S+dS;

E=E+dE;

I=I+dI;

R=R+dR;

p=p+dp;

printf("day %d 确诊病人变化:%d,潜伏期病人变化:%d,退出者变化:%d,普通人变化:%d ",day,dI,dE,dR,dS);

printf("确诊累计病人:%lld,潜伏期病人:%lld,退出者:%lld,现存确诊:%d\n",I+R,E,R,I);

// printf("%lld\n",I);

}

return 0;

}

```

你可能感兴趣的:(新冠美国疫情代码)