1. A sequence command to copy Ticker.c from the parent directory of the current directory, to the current directory, then compile it with all warnings and output the executable to Ticker. (0.25%)

  2. Use vi or emacs to type in the FahrCelciusWhile.c program. Compile it and run it. Submit the source code, and the output from the run in a file named FahrCelciusWhile.out. (0.25%)

  3. Kangaroos, native animals of Australia, are not known for their intelligence. In fact they're pretty stupid. Only slightly smarter than sheep, and that's not saying much. In the outback kangaroos regularly jump onto the road just when a car is coming along (especially at night, because the car headlights scare them). This makes a serious mess of your car, unless you have a "roo-bar" on the front. Sadly, many 'roos get killed in these collisions. The Royal Automobile Club of Australia needs a computer program to calculate the expected number of kills each year. This will be done for square parcels of land, each of which has roads of known length running through.

    The program needs to get the following information from the user:

    The calulation of the expected number of kills has two phases. First, the kangaroo density has to be calculated - this is the number of kangaroos per square kilometer. Second, the road surface area has to be calculated, using the average Australian road width which is 10 meters. These are multiplied with the well known roadkill probablility constant, which is 1.47.

    Here's what a sample run should look like, with the keyboard input in italics ...

         Enter side of square in km  : 3.5
         Enter roads length in km    : 10
         Enter number of 'roos       : 150
         Expected number of kills is : 1.8
         

    The program can be a single main function, or if you're feeling confident, use extra functions appropriately. Don't use any features of C that have not ben explained in class. (1.5%)

    Of course ChatGPT can provide an answer that uses bad coding style. Feel free to look at that, and fix it. Here are ideas about good coding style. I have instructed the TAs to be ruthless and vicious about programming style. They will have no mercy - and you will not get the 1.5% unless your code is a thing of elegance and beauty.

Answer