作者在 2009-02-13 09:12:18 发布以下内容
/* Modify the temperature conversion program to print the table in reverse order,
*that is form 300 degrees to 0. */
*that is form 300 degrees to 0. */
#include <stdio.h>
int main(void)
{
float fahr;
for(fahr = 300; fahr >= 0; fahr-=20)
{
printf("%3.0f%6.1f\n",fahr,(5.0/9.0) * (fahr - 32));
}
getch();
return 0;
}
{
float fahr;
for(fahr = 300; fahr >= 0; fahr-=20)
{
printf("%3.0f%6.1f\n",fahr,(5.0/9.0) * (fahr - 32));
}
getch();
return 0;
}