I feel the code should be executing properly for the floating point number printout however it keeps printing a zero value for some reason. Hopefully you can point me in the right direction of my mistake. I need it to display 2 decimal places to show as a currency as you can see in my code snippet. Thanks in advance
#include <stdio.h>
int main(void) {
double myNumber2;
printf("Guess how much I paid for my coffee this morning using the following format 1.65 which would represent $1 and 65 cents: ");
scanf("%.2f", &myNumber2);
printf("You guessed that I paid $%.2f for my coffee.\n", myNumber2);
return 0;
}