Exercise 1-5

作者在 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. */
 
#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;
}
文章评论,共0条
游客请输入验证码
浏览27709次
文章归档