坐式排球吧 关注:7贴子:18
  • 0回复贴,共1
  • 202.115.91.*
#include<stdio.h>
/*print Celsius-Fahrenheit table
   for cels=-18,-8,...,148*/
main()
{
int celsius,fahr;
int lower, upper, step;

lower=-18;       /*lower limit of temperature table */
upper=148;       /*upper limit */
step=10;         /*step size */

    celsius=lower;
while (celsius<=upper) {
fahr=(9*celsius/5)+32;
printf("%d\t%d\n",celsius,fahr);
celsius=celsius+step;


1楼2008-09-23 14:02回复