Thread: basic ms-dos sim, need help

  1. #1
    Registered User
    Join Date
    Jan 2006
    Posts
    12

    basic ms-dos sim, need help

    i am making an ms-dos based simulation based on an ecosystem.
    there are three factors, the herbivores (deer), carnivories (bears), and the food supply (the plants). the mathematical model i'm using is quite basic -

    a & b - chance of creation
    c & d - chance of destruction
    s - seconds

    (a/b x s) + (-c/d x s) + (a/b x s)

    basically, every second, there is a ?/? of something being created and a ?/? of something being destroyed.

    i need to create a simulation which will compute this, whilst at the same time displaying on the screen a log file of what is happening. i'm not the greatest with c++, so i need a few pointers on how to do this.

    thanks,

    JOlszewski

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    Say something like
    Code:
    for ( int seconds = 0 ; seconds < lifetime ; seconds++ ) {
      calculatePopulations( );
      displayResults( );
    }

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Simple Novice Question: MS DOS app. a console?
    By renurv in forum C++ Programming
    Replies: 7
    Last Post: 12-30-2005, 02:42 PM
  2. MS DOS Window closes right away!
    By poolshark1691 in forum C++ Programming
    Replies: 5
    Last Post: 05-24-2005, 11:35 AM
  3. winver, winminor, winmajor can it be found from dos?
    By ronin in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 10-02-2002, 10:32 AM
  4. Replies: 3
    Last Post: 09-26-2002, 11:07 AM