M
Matt Suther
I just bought The C Programming Language, by the guy who made C and
so...I have 2 different compilers, free ones, and I don't know if I
typed the code in wrong or if it's a problem with my compilers, do any
of you know? They were free compilers: Icc-win32 and Bloodshed Dev
C++(uses C too). Are there and compilers that are free besides mars,
and gcc-whatever, can't get them to work. Thanks.
heres the code, is there anything wrong with it:
#include <stdio.h>
main()
{
int fahr, celsius;
int lower, upper, step;
lower = 0;
upper = 300;
step = 20;
fahr = lower;
while (fahr <= upper) {
celsius = 5 * (fahr-32) / 9;
printf("%d\t%d\n", fahr, celsius);
fahr = fahr + step;
}
}
so...I have 2 different compilers, free ones, and I don't know if I
typed the code in wrong or if it's a problem with my compilers, do any
of you know? They were free compilers: Icc-win32 and Bloodshed Dev
C++(uses C too). Are there and compilers that are free besides mars,
and gcc-whatever, can't get them to work. Thanks.
heres the code, is there anything wrong with it:
#include <stdio.h>
main()
{
int fahr, celsius;
int lower, upper, step;
lower = 0;
upper = 300;
step = 20;
fahr = lower;
while (fahr <= upper) {
celsius = 5 * (fahr-32) / 9;
printf("%d\t%d\n", fahr, celsius);
fahr = fahr + step;
}
}