Preview

The Drunken Cockroach Simulation

Satisfactory Essays
Open Document
Open Document
93 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
The Drunken Cockroach Simulation
//casestudy 1 the drunken cockroach/*start of the program*/#include<stdio.h>#include<conio.h>#include<stdlib.h>#include<dos.h>void main(){int iteration,sizerow,sizecol,imove[8],jmove[8],k,ibug,jbug,a,b,legal=0,boundaryrow,boundarycol,move=0,count[40][40]={0};char tile[40][40];clrscr();printf("The Drunken Cockroach Simulator!\n");printf("Note:\nSometimes this cockroach steps on the already stepped tiles because its drunken");printf("\n'S' - stands for the starting point \n'C' - stands for the stepped tiles \n'Q' - stands for unwalkable tiles");printf("\nInput the size of the room you want (row,column): ");scanf("%d,%d",&sizerow,&sizecol);printf("Input the cockroach's starting point (row,column): ");scanf("%d,%d",&jbug,&ibug);printf("Input

You May Also Find These Documents Helpful

  • Satisfactory Essays

    Choosing bed bug exterminators in Calgary must be taken seriously because just like any other homeowner, you do not want to pay for a service that's not worth your hard-earned money. Pick an experienced company that understands the finest way in getting rid of pests. Almost all exterminators utilize different methods of eliminating bugs and this will depend on how bad the infestation is. There are tons of factors that must be considered when picking the best bed bugs exterminator in Calgary including the service quality, cost, communication, and guarantee.…

    • 516 Words
    • 3 Pages
    Satisfactory Essays
  • Powerful Essays

    Pesticides are toxic and go through many different testings and procedures before they are put on the shelf in various industries. One general method that is used to asses toxicity of pesticides before released for sale is the LD50 (Lethal Dose 50) method. This method is conducted by calculating the most accurate dose of toxin that will kill animals 50% of the time. Before determining an accurate LD50 of a chemical however, a range finding analysis of the chemical will be performed in order to calculate the most accurate LD50. Undergoing this procedure includes using a wide-spread range of concentrations which are mostly preformed at log dose intervals. (H.P. Rang, M.M. Dale, J.M. Ritter and R.J. Flower, 2007).…

    • 1605 Words
    • 7 Pages
    Powerful Essays
  • Satisfactory Essays

    CS159 HW1

    • 319 Words
    • 2 Pages

    DO NOT use any material found outside of the first THREE chapters of the C text.…

    • 319 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    Hissing Cockroaches

    • 1217 Words
    • 5 Pages

    Temperature and environment plays a key role on the effects of an ectothermic organism’s metabolism. The specific ectothermic organism used in this study was the Gromphadorhina portentosa also known as the Madagascar Hissing Cockroach. In this study we measured CO2 production (%) and temperature (̊C) every three minutes for a total of 15 minutes in three different temperature environments. The three temperature environments conducted in the experiment included room temperature, a cold environment (ice bath), and a hot environment (how water bath). The purpose of this study was to test the effects of temperature change on the ectothermic organism Madagascar Hissing Cockroach (Gromphadorhina portentosa) and its metabolic rate. The null hypothesis was that there would be no change in metabolic rate and CO2 gas percentage levels despite changes in temperature. The alternative hypothesis was that the CO2 gas percentage levels from the ectothermic organism would change with changes in temperature. Our findings reject the null hypothesis and agree with the alternative hypothesis reflecting that the CO2 gas percentage levels from the ectothermic organism did change with changes in environmental temperature.…

    • 1217 Words
    • 5 Pages
    Powerful Essays
  • Satisfactory Essays

    9.) A bug collector collects bugs every day for 7 days. Design a program that keeps a running total of the number of bugs collected during the 7 days. The loop should ask for the number of bugs collected each day, and when the loop is finished, the program should display the total number of bugs collected.…

    • 651 Words
    • 4 Pages
    Satisfactory Essays
  • Good Essays

    I see it! No way. It’s crawling briskly near me. That roach is coming closer and closer to my feet as if I had sugar all around it. I am alone and no one is in the house and I had to kill it. I had to try. I got a fly swatter and quietly tiptoed near the roach. As fast as the speed of lightning, I swatted the fly swatter on the roach, hearing a crunching sound. I have been courageous when I killed a roach because to kill a roach, I had to be still, I had to kill it with something, and I had to stay quiet; killing a roach is very arduous and challenging.…

    • 577 Words
    • 3 Pages
    Good Essays
  • Good Essays

    As I read both of these essays completely nonbiased to each of the situations, minus my fear of spiders, I came to the conclusion that if I had to put one above the other I would choose the “Gang Initiation Warning” above the “Toilet Spiders” essay simply because the essay about the gangs was more realistic than the one on the toilet spiders. Both papers were a bit extreme and seemed to have a purpose of just inducing fear on people; but the issue for me was, which is more believable and realistic.…

    • 448 Words
    • 2 Pages
    Good Essays
  • Good Essays

    Run Speed: 2, Name: 0.372, Intimidate: 3, Food Search: 194, Attack: 6, Health: 70, Regen: 0.4, Age to Start Hunting: 14, Hunt Speed: 1, Danger Distance: 19…

    • 632 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    Assignment 2

    • 338 Words
    • 2 Pages

    You must use an if statement and at least one switch statement in your program…

    • 338 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    “ Escaping death and achieving potential immortality” writes the first scientists to describe this phenomenon [2], but is this just a neat trick, or can some species really live forever? This jelly is now known as the “immortal jelly”, and its infamy has grown with the years. But no one has published a report that this jelly can truly withstand the test of time; in fact, only one paper has been published suggesting some jelly relatives could live forever.…

    • 1007 Words
    • 5 Pages
    Good Essays
  • Good Essays

    Bedbug Research Paper

    • 454 Words
    • 2 Pages

    If you suspect that you have bed bugs in your bedroom at home, there are a few things you can do right away before you call in for professional assistance for dealing with the problem.…

    • 454 Words
    • 2 Pages
    Good Essays
  • Satisfactory Essays

    Phantasiae… sounds so much like a mystical word, but it something that we all have at times. We all have beliefs that swear to everything good under the sun are true, despite the fact that there is superior evidence to say otherwise. But so many times have others been told they have phantasiae. when really their facts are correct. People carry in their hearts hopes and dreams of a better life in the forefront of their minds, only for people to tell them it will never work, never happen, or never exist. In today's world dreams are a hobby, not a lifestyle. What happened to the generation of believers? What happened to the hearts who did more than just say they could, but actually did it? Chasing fireflies has been our story, but never has it…

    • 489 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Simulation Class 1

    • 212 Words
    • 2 Pages

    1. The time between arrivals of cars at MRR Service Company is shown in the following probability…

    • 212 Words
    • 2 Pages
    Good Essays
  • Good Essays

    simulation

    • 541 Words
    • 7 Pages

    SIMULATION • WHAT is Simulation ? • WHY is Simulation required ? • HOW is Simulation applied ? • WHERE is Simulation used ? DEFINITION • Simulation is a representation of reality through the use of model or other device, which will react in the same manner as reality under a given set of conditions.…

    • 541 Words
    • 7 Pages
    Good Essays
  • Powerful Essays

    Tawfiq al-Hakim or Tawfik el-Hakim, (October 9, 1898 – July 26, 1987) was a prominent Egyptian writer. He is one of the pioneers of the Arabic novel and drama. He was born in Alexandria, Egypt, the son of an Egyptian wealthy judge and a Turkish mother The triumphs and failures that are represented by the reception of his enormous output of plays are emblematic of the issues that have confronted the Egyptian drama genre as it has endeavored to adapt its complex modes of communication to Egyptian society.…

    • 3973 Words
    • 16 Pages
    Powerful Essays