Hello,
I have to find the greatest number a user enters.
When the user enters a ) or a number smaller then 0 then the output has to stop,
So I made this :
Code:
#include <stdio.h>
int
main ( int argc, char *argv[] )
{
float getal, grootste ;
getal = grootste = 1 ;
do
{
printf("Enter a number : ");
scanf ("%f", &getal);
printf ("Ingevoerde getal : %f", getal) ;
}
while (getal <=0);
printf ("Het grootste getal is %f", grootste);
return 0 ;
} /* ---------- end of function main ---------- */
But when the user enters one number the loop stops.
What is my thinking error here ?
Roelof