Commit 5ec0a38d authored by Dominik Widhalm's avatar Dominik Widhalm
Browse files

Update example solution task 4.07 to fully comply with task specification

parent 87141ec9
......@@ -55,15 +55,15 @@ int main (void) {
/* Read in the user's input */
scanf("%lf",&cash);
/* Check if input was valid */
if (cash < 0) {
if (cash < 0.1) {
/* Number has to be greater than 0 */
printf("The entered deposit is less than 0!\n");
printf("The entered deposit is too less!\n");
}else if (cash > MONEY_MAX) {
/* Number entered is too big */
printf("The entered deposit is too big!\n");
}
/* Repeat when a invalid number was entered */
} while ((cash < 0) || (cash > MONEY_MAX));
} while ((cash < 0.1) || (cash > MONEY_MAX));
/*
* From this moment on we calculate with (int), because ...
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment