2 つの temp の差を見つける関数があります。まず、摂氏と華氏のおおよその値を出力してから、それらの違いを見つけて出力します。私の問題は、プログラムを実行したときに発生するのは、すべての差の出力が 58 であることだけです。
次のようなものを出力する必要があります。
C----AF----Diff
1----32----31
2----34----32
等
私のコード:
void calDiff(int& cel, int& appFar, int diff){
while(cel!= 101){
diff = appFar - cel;
cout << diff << endl;
cel++;
appFar++;
}
}