Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float congthuc(int A1 , int D1 , int A2 , int D2 , int P)
- {
- float ketqua = 0.0;
- float d = 0 , e = 0 , f = 0 , g = 0 , max = 0 , min = 0;
- d = (float)((A1 - D2 + 88) * (12 - P)) / 1232;
- e = (float)((D1 - A2 + 90) * (12 - P)) / 1260;
- if (d > e)
- max = d;
- else
- max = e;
- if (max < 1)
- ketqua = max;
- else
- ketqua = 1.00;
- return ketqua;
- }
- b = A1 * 2;
- c = D1 / 2;
- i = D2 - 20;
- h = A2 * 20;
- if (h > 90)
- h = 90;
- if (i < 1)
- i = 1;
- if (c < 1)
- c = 1;
- if (b > 100)
- b = 100;
- //truong hop a
- if (( A2 > (D1 * 2)) && (D2 > (A1 * 2) ))
- {
- if ( P >= 5 )
- fOut = 0.0;
- else
- if ( P < 5 )
- {
- fOut = congthuc(b,c,A2,D2,P);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement