IHYPRESS.NET > "C"
HOME | ASP | C | HTML/CSS | JAVASCRIPT | MATLAB | PERL | PHP | PYTHON | RUBY
C > 04. Loops
<
  1. A simple count from 1 to 100
    A program that displays the numbers between 1 and 100.
  2. Mission to the Moon
    This program computes the length of a mission to take photographs around the Moon given the time it takes to get there and to go around the Moon once.
  3. The fuel tank program
    A program that monitors the amount of fuel in a tank and gives a warning if the supply falls below 10% of the tank's capacity.
  4. Simple countdown using a for loop
    A program that displays all the numbers between 60 and 0 and then prints the word LIFTOFF afterwards.
  5. Sums and averages
    A program that computes the average of all the numbers in a file of integers.
  6. Birdwatching program (fixed loop / file input)
    This program reads a file that contains 12 lines of bird sightings and adds up all the sightings for a year.
  7. Birdwatching program (EOF loop / feof)
    A program similar to the previous one but with an unknown number of records in the file.
  8. Birdwatching program (EOF loop / status var)
    The same program that works with an unknown number of records but uses a status variable instead of the foef statement.
  9. Birdwatching program (EOF loop / no status var)
    The same program that works with an unknown number of records but does not use a status variable nor an foef statement.
  10. Input validation loop (do-while)
    The best use of a do-while loop: An input validation loop. This program validates that the color entered is a valid traffic light color.
>
COPYRIGHT © 2017 IHYPRESS.NET. A DIVISION OF IHY PRESS, KIRKLAND, WA 98083 USA. ALL RIGHTS RESERVED.