Skip to content

Latest commit

 

History

History
46 lines (33 loc) · 1.23 KB

README.md

File metadata and controls

46 lines (33 loc) · 1.23 KB

Objectives

The objectives of this task are two-fold:

  • To better to understand random integer and random number generation.
  • To better understand Monte Carlo simulation through the generation of customer random service \ times according to certain probabilities.

List of files submitted

  • sim.c : source code for sim
  • sim.exe : compile code
  • Makefile : config to help compile, test, clean (working dir) and run codes
  • test.sh : simple script to test codes and report errors
  • results.doc : simulation results

How-To Guide > LINUX

To compile and test the codes

  • $ mingw32-make test
  • OR
  • $ make test

To run simulation and print the results

  • $ mingw32-make run
  • OR
  • $ make run

To clean working directory (remove results and all .exe files)

  • $ mingw32-make clean
  • OR
  • $ make clean

If you have difficulty using Makefile, please run the following commands...

Create Results Doc

  • $ touch results.doc

Compile Code

  • $ gcc sim.c -o sim

Run code and append results to results file

  • $ ./sim >> results.doc

Have a nice day...