#BEGENNER HELP" again!
Could someone pleese tell me what is wrong with the following program (it is in
C…compiled with the manix/Aztec compilar-linker (commersial))
main() {
float number;
printf("hello!\n");
number = 1000000;
while(number >= 0)
{
printf("%f\n", number);
number = number – 1.;
} }
It is supposed to open up a window on the workbench (or if run from the CLI, it
will use the CLI) and count down from one million.(and say hello!) the problem
is that when it is subtracting, it is not accurite! it says "1000000
999999.253964 999998.175283 999997.056238…"
Where did the decimal point come from? I know the amiga can do proper
sutraction! If anyone has any ideas, could thay send them! (I am the same
person who, a few weeks ago, was asking about how to get started in "C". I
found the Aztec compilar 2nd hand with the book "Amiga C for beginners" and
many other refrances.