Professional Documents
Culture Documents
h>
#include<conio.h>
#include<math.h>
int main()
float p,T,rho,p0,T0,rho0,M;
int option;
scanf("%f",&M);
scanf("%d",&option);
switch(option)
case 1:
scanf("%f%f",&p,&rho);
T=p/(rho*287);
T0=T*(1+0.2*M*M);
p0=p*pow((1+0.2*M*M),3.5);
rho0=p0/(287*T0);
return 0;
break;
case 2:
scanf("%f%f",&p,&T);
rho=p/(T*287);
T0=T*(1+0.2*M*M);
p0=p*pow((1+0.2*M*M),3.5);
rho0=p0/(287*T0);
break;
case 3:
scanf("%f%f",&rho,&T);
p=rho*287*T;
printf("The static temperature is %f \n",&T);
T0=T*(1+0.2*M*M);
p0=p*pow((1+0.2*M*M),3.5);
rho0=p0/(287*T0);
break;
getch();