Variable and Arithmetic Operation
#include
#include
int main(){
int far ,celsius;
int lower ,upper,step;
lower = 0;
upper = 300;
step =20;
far = lower;
while(far <= upper )
{
celsius = 5 * (far - 32)/9;
printf("%d\t%d\n", far ,celsius);
far += step;
}
getch();
return 0;
}
No comments:
Post a Comment