some of you may have looked at my earlier post, basically, i'm making a ecosystem simulation based on the following mathematical model -
(a/b*c) -(d/e*c)+(a/b*c)
there is a ? out of ? chance that an animal will be created, and a ? out of ? chance that something will be destroyed. the math model basically just shows the final amount of animals.
so far what i've got -
Code:
#include <stdio.h>
main()
{
float a,b,c,d,e,f,g,h,i;
printf("number of seconds");
scanf ("%d",&c);
printf("first number for creation");
scanf("%d",&a);
printf("second number of creation");
scanf("%d",&b);
printf("first number of destruction");
scanf("%d",&d);
printf("second number of desturction");
scanf("%d",&e);
f=(a/b*c) -(d/e*c) +(a/b*c);
printf("the final amount is %d\n",f);
}
i've tried so many different things...and yet nothing works...
help!!!
thanks in advance,
JOlszewski