<?php header('Content-Type: text/html; charset=utf-8'); include './assets/php/head.php'; echo '30 度角的正弦值为:'; echo sin(deg2rad(30)); echo ' '; echo sin(pi()/6); echo '<br>'; echo '60 度角的正弦值为:'; echo sin(deg2rad(60)); echo ' '; echo sin(pi()/3); echo '<br>'; echo '90 度角的正弦值为:'; echo sin(deg2rad(90)); echo ' '; echo sin(pi()/2); echo '<br>'; echo '<br>'; echo '30 度角的余弦值为:'; echo cos(deg2rad(30)); echo ' '; echo cos(pi()/6); echo '<br>'; echo '60 度角的余弦值为:'; echo cos(deg2rad(60)); echo ' '; echo cos(pi()/3); echo '<br>'; echo '90 度角的余弦值为:'; echo cos(deg2rad(90)); echo ' '; echo cos(pi()/2); echo '<br>'; echo '<br>'; echo '30 度角的正切值为:'; echo tan(deg2rad(30)); echo ' '; echo tan(pi()/6); echo '<br>'; echo '60 度角的正切值为:'; echo tan(deg2rad(60)); echo ' '; echo tan(pi()/3); echo '<br>'; echo '90 度角的正切值为:'; echo tan(deg2rad(90)); echo ' '; echo tan(pi()/2); echo '<br>'; echo '<br>'; ?> <?php include './assets/php/foot.php'; ?>
效果图:
标签:deg2rad,度角,三角函数,值为,echo,nbsp,010001,pi From: https://www.cnblogs.com/onestopweb/p/16836618.html