Hello,
1. I AM A COMPLETE C++ NEWBIE
ok, maybe not totally, but i need a bit more explanation then the averege person
2. I am coding a ecosytem simulation which is not dynamic (hence meaning that there is no chance involved). It's based on this mathetmatical model -
(a/b * s) + (-c/d * s) + (a/b * s)
Basically, the person inputs two numbers which symoblize a ? out of ? chance of something being created, multiplied by the seconds. Then the person inputs two numbers which symbolize a ? out of ? of something being killed/destoryed, multiplied by the seconds. The next step is basically step 1. The remaining number is the end amount of this one specific speicies (i'm doing an ecosystem sim).
Here is what I need to know:
1. for step two, how do i make the number negative?
2. how do i make this friggen think work? LOL! put it this way, i'm not that bad of a coder, but i'm a horrible debugger, and i couldn't find an error if my life depended on it. please tell me any obvious mistakes.
Here is the code so far -
Code:
#include <stdio.h>
main()
{
int a,b,c,d,e,f,g,h,i,j,k,l,m;
printf("\first number for creation");
scanf("%d",&a);
printf("second number of creation ");
scanf("%d",&b);
printf("number of seconds ");
scanf ("%d",&c);
d=a/b*c
printf("\first number of destruction");
scanf("%d",&e);
printf("second number of desturction ");
scanf("&d",&f);
printf("number of seconds ");
scanf ("&d",&c);
h=e/f*c
printf("\first number of creation");
scanf("%d",&i);
printf("second number of creation ");
scanf("&d",&j);
printf("number of seconds ");
scanf ("&d",&c);
l=i/j*c
m=d+h+l
printf("the final amount is %d /n,l");
}
Thanks in advance,
JOlszewski