Node:Questions for Chapter 10, Previous:Example 15, Up:Decisions

Questions for Chapter 10

  1. Translate the following into good C: "If 1 does not equal 42, print out `Thank heavens for mathematics!' "
  2. Write a program to get a lot of numbers from the user and print out the maximum and minimum of those.
  3. Write an automatic teller machine program that simulates telling you your bank balance when you enter your account number and PIN number, but otherwise displays an error.
  4. Write a mock program for a car computer that tells you how many kilometers to the liter you're getting when you enter how many liters of gas you've used and how far you travelled.