
c语言 大家帮我看看这个小程序错在哪?为何运行不了,多谢啦!
#include<stdio.h>#include<math.h>#definePI3.1415926main(){longdoublep1=981.0;longdoub...
#include <stdio.h>
#include <math.h>
#define PI 3.1415926
main()
{
long double p1=981.0;
long double g=9.80;
long double n=1.83e-5;
long double l=2e-3;
long double b=6.17e-6;
long double p2=76.0;
long double d=5e-3;
long double a,q,t,v,j1,j2,j3;
printf("Please input t,v:\n");
scanf("%lf,%lf",&t,&v);
a=sqrt(9*n*l/(2*p1*g*t));
j1=n*l/(t*(1+b/(p2*a)));
j2=pow(j1,3);
j3=sqrt(j2);
q=18*PI*j3*d/(sqrt(2*p1*g)*v);
printf("%lf\n",q);
} 展开
#include <math.h>
#define PI 3.1415926
main()
{
long double p1=981.0;
long double g=9.80;
long double n=1.83e-5;
long double l=2e-3;
long double b=6.17e-6;
long double p2=76.0;
long double d=5e-3;
long double a,q,t,v,j1,j2,j3;
printf("Please input t,v:\n");
scanf("%lf,%lf",&t,&v);
a=sqrt(9*n*l/(2*p1*g*t));
j1=n*l/(t*(1+b/(p2*a)));
j2=pow(j1,3);
j3=sqrt(j2);
q=18*PI*j3*d/(sqrt(2*p1*g)*v);
printf("%lf\n",q);
} 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询