#include<stdio.h>
void main()
{
int c,f;
printf(“please input the number:\n”);
scanf("%d",&f);
c=(f-32)*5/9;
printf("%d",c);
}
编写程序,将华氏度转换为摄氏度。转换公式为:c = 5 * (华氏度f - 32) / 9;其中,c为摄氏度,f为华氏度。
最新推荐文章于 2023-08-05 19:41:14 发布
#include<stdio.h>
void main()
{
int c,f;
printf(“please input the number:\n”);
scanf("%d",&f);
c=(f-32)*5/9;
printf("%d",c);
}