My program runs, but does not actually do what I want it to do. It prompts for start size, then prompts for end size, and then that's it. I want it to then use the inputted numbers to calculate how many years it would take but I can't seem to get it to do that. Thanks in advance for any suggestions!
My code is as follows:
#include <cs50.h>
#include <stdio.h>
int main(void)
{
// TO DO: Prompt for start size
int start;
do
{
start = get_int("Start Size: ");
}
while (start < 9);
// TO DO: Prompt for end size
int end;
do
{
end = get_int("End Size: ");
}
while (end <= start);
// TO DO: Calculate number of years until we reach threshold
int years;
do
{
years = (start + start/3 - start/4);
}
while (end > start);
// TO DO: Print number of years
printf("Years:%i\n", years);
}