Sie sind auf Seite 1von 1

#include<conio.

h>
#include<stdio.h>
#include<math.h>
void main (void)
{
clrscr();
double x,y,z,a,b,c,d,e,g,h,i,o=0,f=1;
printf("ENTER THE DIAMETER ");
scanf("%lf",&x);
printf("\n ENTER THE ROUGHNESS VALUE");
scanf("%lf",&y);
printf("\nENTER THE REYNOLDS NUMBER");
scanf("%lf",&z);
a=(9.3*x)/(z*y*sqrt(f));
b=1.14+2*log10(x/y)-2*log10(1+a);
c=1/b;
d=pow(c,2);
e=pow(c,3);
g=2*e*9.3*pow(f,-1)/(((a/9.3)+9.3)*log(10));
h=f-d;
i=1+g;
while (o!=f)
{
o=f-(h/i);
f=o;
}
printf("%lf",o);
getch();
}

Das könnte Ihnen auch gefallen