Name: ____________________________________________________ Alpha: _____________________

Describe help received: _________________________________________________________________

  1. [10 pts] We would like you to self-test how much you retained from the lecture. Write the correct solution to the Mandatory Practice Problems. Debug your code until it runs correctly. Circle below how you wrote your code.
    1. (10 pts) I was able to write the code without referring to anything.
    2. (10 pts) I had to look at the notes, but still I was able to write the code without looking at the solution.
    3. (10 pts) I had to look at solutions to finish to code.
    4. (0 pts) I didn't do this.
    If you had to look at the solution, briefly describe what you missed but understand now.
    
    
    
    
  2. [90pts] Write a program hw.c that reads two points and outputs its midpoint.

    Sample run:

    $ ./hw
    (2.4,0.1)
    (6.2,9.4)
    (4.300000,4.750000)
    
    Note:: scanf doen't skip space unless it is told to do so.
    
    // DON'T DO THIS
    scanf("%c", &c);
    // BUT DO THIS
    scanf(" %c", &c); //" " before %c tells scanf to skip space
    

    Turn in