Here we have collected a large number of rounding functions in php, including round (), ceil (), and floor (). If you need them, please refer to them. & Lt ;? Php $ srand (100,200); $ pipi (); $ rsqrt ($ s
Here we have collected a large number of rounding functions in php, including round (), ceil (), and floor (). If you need them, please refer to them.
- $ S = revert (100,200 );
- $ Pi = pi ();
- $ R = sqrt ($ s/$ pi );
- $ Qz1 = round ($ r); // rounding to get an integer
- $ Qz2 = ceil ($ r); // perform an integer operation in one step.
- $ Qz3 = floor ($ r); // rounds the result
- Echo "the area of the randomly generated circle is:". $ s ."
";
- Echo "the radius of the circle calculated by division and the open side is:". $ r ."
";
- Echo "rounded up:". $ qz1 ."
";
- Echo "after an integer is obtained:". $ qz2 ."
";
- Echo "rounded up:". $ qz3 ."
";
- ?>