質問編集履歴

1

コードを入力しました。

2022/02/19 04:48

投稿

tsubasamusu
tsubasamusu

スコア0

test CHANGED
File without changes
test CHANGED
@@ -5,3 +5,20 @@
5
5
  と表示されます。どうすればいいですか?
6
6
  なるべくプログラミング初心者にもわかるように説明していただけると嬉しいです。
7
7
 
8
+ #include<stdio.h>
9
+
10
+ int main(void)
11
+ {
12
+ double height, weight;
13
+
14
+ printf("身長を入力してください。\n");
15
+ sscanf_s("%lf", &height);
16
+
17
+ printf("体重を入力してください。\n");
18
+ scanf_s("%lf", &weight);
19
+
20
+ printf("身長は%fセンチです。\n", height);
21
+ printf("体重は%fキロです。\n", weight);
22
+
23
+ return 0;
24
+ }