no message

This commit is contained in:
a-kizaki
2026-10-09 12:33:29 +09:00
commit c4365a352f
71 changed files with 12139 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
<?php
$moneyInHand = 1000; // 所持金
$coffee = 120; // コーヒーの値段
$snack = 200; // スナック菓子の値段
/*
* ● 1本あたり120円(税別)の缶コーヒーを2本
* ● 1袋あたり200円(税別)のスナック菓子を1袋
*
* 上記商品を購入した時の所持金を表示してください
* ※ 消費税は、全商品の合計に8%が加算されます
* ※ 日本円には小数点がありませんので、整数の値で出力してください
*/
$total = ($coffee * 2) + $snack;
$tax = $total * 0.08;
$taxTruncation = floor($tax);
$moneyInHand = $moneyInHand - ($total + $taxTruncation);
echo '所持金' . $moneyInHand;