1
0

More than 1 year has passed since last update.

【PHP基礎復習7】掛け算②

Last updated at Posted at 2022-09-06

[問題]
ユキさんは、部屋の壁にポスターを貼ろうとしています。
1枚で幅Acmのものを4枚貼ると、幅は合計何cmになるでしょうか。

コード

$input = fgets(STDIN);
echo $input*4, PHP_EOL;

↓ 30と入力

結果

120
1
0
0

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
1
0