Skip to content

Instantly share code, notes, and snippets.

@MattSA
Created February 10, 2014 18:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MattSA/8921872 to your computer and use it in GitHub Desktop.
Save MattSA/8921872 to your computer and use it in GitHub Desktop.
#include <cs50.h>
#include <stdio.h>
// prompt user for change requirement
float main (void)
{
float change;
printf("How much change do you want? \n");
change = GetFloat();
while (change < 0)
{
printf("Try again \n");
printf("How much change do you want? ");
change = GetFloat();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment