$ clang cash.c
/tmp/cash-94cd4e.o: In function main': cash.c:(.text+0x1c): undefined reference to
get_float'
cash.c:(.text+0x44): undefined reference to `round'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
What does this mean?
#include <cs50.h> #include <stdio.h> #include <math.h>
int main (void)
{ float dollar;
do
{ dollar=get_float("Enter your cahnge"); }
while (dollar<=0);
int cents= round (dollar*100); int coins=0;
while (cents>=25)
{ cents-=25; coins++; }
while (cents>=10)
{ cents-=10; coins++; }
while (cents>=5)
{ cents-=5; coins++; }
while (cents>=1)
{ cents-=1; coins++; }
printf ("You will need at least %i coins", coins);
}