I need help on this final Project. Get me on aim at tafnam if u can help or email this to me at mrmattregan@hotmail.com

Project#11

Farmer Jack's Mushroom Farm

You have decided to go into the mushroom farming business. You have gone out and rented a warehouse and built a mushroom bed 20 feet X 20 feet. You have enough money to seed the bed with 10 plants. Each plant grows in a 1X1 area of the bed. You will let those plants grow and propagate new plants until the bed is full. New plants are only born in vacant squares. The probability of a birth in any facant square depends on the number of neighboring plants. The probabilities are as follows:

Neighbors Prob. Of Birth

-------------- -------------------

0 .05

1 .10

2 .20

3 .30

4 .40

5 .50

6 .40

7 .30

8 .25

Mushrooms are very hardy and the probability of one dying decreases as the mushrooms farm becomes more dense. The probability of a living mushroom dying is small, only 2% if there are 100 or less mush rooms, 1% if there are 101-300 mushrooms and 0% if there are more than 300.

Write a program that simulates your mushroom farm. Allow the user to enter the first 10 plants and then "grow" the mushrooms according to the rules above. All births and deaths occur at one time overnight. The farm should continue until either the whole bed is full(harvest time) or all the mushrooms die(bankruptcy). Display each successive generation of plants and tell the user what happened when the farm stops(either harvest or bankrupt).

This is what I got so far: I need this by Wednesday Night.

#include<iostream.h>

#include<iomanip.h>

#include<conio.h>

int main(void)

{

bool farm[22][22];

bool harvest,bankrupt;

init_farm(farm);

plant_farm(farm);

show_farm(farm);

getch();

do

{

grow_farm(farm);

show_farm(farm);

harvest=ready_harvest(farm)

bankrupt=is_bankrupt(farm);

}

while(!harvest&&!bankrupt(farm);

if(harvest)

count<<"Time to harvest the mushrooms";

else

;

}

void grow_farm(bool farm[][20])

{

int i,j,mcount=0,prob,neighbors;

bool temp[22][22]

for(i=0;i<22;i++)

for(j=0;j<22;j++)

temp[i][j]=false;

for(i=0;i<22;i++)

for(j=0;j<22;j++)

{

if(farm[i][j]==true)

{

prob=rand()%100;

if(mcount<=100&&prob==0||prob==1)

farm[i][j]=false;

else if(mcount<=300&&prob==0)

farm[i][j]=false;

}

else

{

prob=rand()%100;

neighbors=farm[i-1][j-1]+farm[i-1][j+1]+farm[i][j-1]

+fram[i][j+1]+farm[i+1][j-1]+farm[i+1][j]+farm[i+1][j+1];

if(neighbors==0&&prob<5)

farm[i][j]=true;

else if(neighbors==1&&prob<10)

}

}