①~⑥に入るプログラムを教えてください。 #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> void to_cm_g( ① , ② ) { ③ }
①~⑥に入るプログラムを教えてください。 #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> void to_cm_g( ① , ② ) { ③ } int main(void) { ④ ; x = 1.750; /* 身長 */ w = 62.5; /* 体重 */ puts("単位変換前"); printf("身長 = %fm、体重 = %fkg\n", x, w); to_cm_g( ⑤ , ⑥ ); puts("単位変換後"); printf("身長 = %fcm、体重 = %fg\n", x, w); return 0; } ーーーーーー出力結果ーーーーーー 単位変換前 身長 = 1.750000m、体重 = 62.500000kg 単位変換後 身長 = 175.000000cm、体重 = 62500.000000g
ベストアンサー
ポインタの学習かな?? C 言語はかなり昔に離れてるので間違えてるかもしれませんが・・・ (1) int *centimeter (2) int *gram (3) *centimeter *= 100; *gram *= 1000 (4) int x, w; (5) &x (6) &w
質問者からのお礼コメント
ありがとうございます。
お礼日時:5/25 0:53