scanf("%lf", &Deposit_Amount);
This statement returns garbage value instead of 0.00 when I enter a character.
Here's my code
double Deposit_Amount;
StartDepositInput:;
system("cls");
printf("Enter amount to deposit: ");
scanf("%lf", &Deposit_Amount); // when I enter 'g'
fflush(stdin);
printf("%lf", Deposit_Amount); // it outputs 1802842372383946000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.00
Isn't the scanf should set the value of Deposit_Amount to 0.00 if I input not a valid double?