程序代碼:
#include<stdio.h>
floatchange(floatx);
voidmain(){
floatfahr;
printf("請輸入攝氏溫度:");
scanf("%f",&fahr);
printf("\n對應的華氏溫度為:%.1f\n\n",change(fahr));
}
floatchange(floatx){
floatcent=x*9/5+32;
returncent;
}
程序代碼:
#include<stdio.h>
floatchange(floatx);
voidmain(){
floatfahr;
printf("請輸入攝氏溫度:");
scanf("%f",&fahr);
printf("\n對應的華氏溫度為:%.1f\n\n",change(fahr));
}
floatchange(floatx){
floatcent=x*9/5+32;
returncent;
}