I've trashed this code and started from scratch about twenty times. Starting with step 1, getting a user's input, and I'm having problems even with that.
I've tried declaring change_i and change_f outside of the do-while loop, included and omitted the "= 0", I've omitted the "do", put the "while" inside of the {} of the "do", still missing something.
At one point, I was able to prompt the user for an input, but all it does is keep asking for inputs for eternity, no matter the input.
Can someone help me identify why I am getting so many errors with this code?
Thanks.
#include <cs50.h>
#include <stdio.h>
#include <math.h>
int main(void)
{
int change_i = 0;
do
{
printf("Change due: \n");
float change_f = GetFloat();
int change_i = (100 * change_f);
printf("change_i");
}
while (change_i < 0);
}