So I'm in pset1 and I'm trying to finish the problem set "change". I have the whole program finished... the problem is that getint() wont let me grab decimal numbers. Im not sure if I have to add a particular codeing or what not, but I know one of you guys do.
So this is just the inital codeing you need to see:
#include <cs50.h>
#include <stdio.h>
int main (void)
{
{
printf ("what would you like change for today sir?\n");
}
float amount=0;
do
{
amount=GetInt();
}
while (amount<=0);
When im putting in my input into the terminal this is what i get:
~/workspace/pset1 $ ./change
what would you like change for today sir?
.25
Retry: .50
Retry: 1.50
Retry: 4
Out of the amount you gave us you will have 16 coins!