100000, 2.600000, 25
259999
... when I use 100000, 2.6, and 25 as my inputs in this code...
#include <stdio.h>
main()
{
char again;
int CurrentYr, count,i, NextYr;
float Rate;
do {
printf("How many egrets currently exist?");
scanf("%d",&CurrentYr);
printf("At what rate is their population increasing (1-4)?");
scanf("%f",&Rate);
printf("How many years would you like to forcast?");
scanf("%d",&count);
printf("%d, %f, %d", CurrentYr, Rate, count);
NextYr = CurrentYr * Rate;
printf("\n%d", NextYr);
printf("\n\nWould you like to try again (y/n)");
scanf("%c",&again);
}while (scanf("%c",&again) != "n");
} Can someone please explain why 100000 * 2.6 = 259999??


Sign In
Create Account


Back to top









