0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【JavaScript】税込み価格を計算する関数including_taxを作成せよ

Posted at
<!DOCTYPE html>
<html lang="ja">
<head>
   <meta charset="UTF-8">
   <title>関数課題</title>
</head>
<body>
   <script>
       // 税抜き価格を定義
       var price = window.prompt('<p>税抜き価格を入力してください<p>');
 
       // 関数including_taxを実行する
       function including_tax(price) {
        price = price  * 1.08;
        price = Math.floor(price);
        document.write('税込み価格は' + price + 'です');
       }
 
       // 税込み価格を計算する関数including_taxを作成する
       including_tax(price);
   </script>
</body>
</html>
0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?