From 59d01416a9966b43e37832d556d6e0942d84f8d5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B0=AD=E6=95=8F=E5=8D=8E?= <2557181397@qq.com>
Date: Sun, 15 May 2022 22:41:16 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../20220515-PHP\347\273\203\344\271\240.md" | 51 +++++++++++++++++++
1 file changed, 51 insertions(+)
create mode 100644 "\350\260\255\346\225\217\345\215\216/20220515-PHP\347\273\203\344\271\240.md"
diff --git "a/\350\260\255\346\225\217\345\215\216/20220515-PHP\347\273\203\344\271\240.md" "b/\350\260\255\346\225\217\345\215\216/20220515-PHP\347\273\203\344\271\240.md"
new file mode 100644
index 0000000..1bd637b
--- /dev/null
+++ "b/\350\260\255\346\225\217\345\215\216/20220515-PHP\347\273\203\344\271\240.md"
@@ -0,0 +1,51 @@
+```php+HTML
+";
+$name="该三角形";
+$bottom=3;//底
+$height=4;//高
+$hypotenuse=5;//斜边
+if($bottom*$bottom+$height*$height==$hypotenuse*$hypotenuse){
+ echo "$name"."是直角三角形";
+}else{
+ echo "\t$name不是直角三角形";
+}
+
+echo "
2、简易版喝汽水某喝汽水比赛,求积分。比赛规则如下:
+选手喝汽水小于等于20瓶,每瓶按1积分计算。选手喝汽水大于20瓶,超出部分按每瓶1.5积分计算。";
+
+echo "
";
+
+$soda=20;
+$integral=0;
+if ($soda<=20){
+ $integral+=$soda;
+ echo "该选手的积分为:".$integral;
+}else if ($soda>20){
+ $integral= (($soda-20)*1.5)+20;
+ echo "该选手的积分为:".$integral;
+}
+
+
+echo "
3、使用循环倒序输出1-10之间的数字,至少两种方法实现。";
+echo "
";
+
+$S=10;
+for ($A = $S;$A >= 1;$A--){
+ echo $A." ";
+}
+while ($S >= 1){
+ echo $S." ";
+ $S--;
+}
+```
+
--
Gitee