在c开发环境下,编写、编译、运行一个简单的算术运算程序,实现以下计算。

#include <stdio.h>
#include <stdlib.h>
#include<math.h>
int main()
{
double x, f;

while(scanf("%lf", &x) != EOF)
{
f = x/5*9+32;
printf("%.摄氏度x=%.2f时,华氏度f=%.2f\n", x, f);
printf("\n");
}
return 0;
}

 

#include <stdio.h>
#include <stdlib.h>
#include<math.h>
int main()
{
double x, ans;
while(scanf("%lf", &x) != EOF)
{
ans = pow(x, 365);
printf("%.2f的365次方: %.2f\n", x, ans);
printf("\n");
}
return 0;
}

 

posted @ 2022-03-26 19:34  Evanseco  阅读(108)  评论(0编辑  收藏  举报