Fundamentals of Computer Science II (CSC-152 97F)

[News] [Basics] [Syllabus] [Outlines] [Assignments] [Examples] [Readings] [Bailey Docs]


Outline of Class 11: Looping

Miscellaneous


While Loops

For Loops

Pre- and Post-increment

Exercise

Write a program that builds a 10x10 multiplication table. If you have time, you may wish to extend it to read the width and height from the command line.

The core of your program will most likely look something like the following

for(row = 1; row <= width; ++row) {
  // You may want to fill in something here
  for(column = 1; column <= width; column = column + 1) {
    // Fill in something here
  } // for each column
  // You may want to fill in something here
} // for each row

Extended Loop Control


Outlines: prev next


[News] [Basics] [Syllabus] [Outlines] [Assignments] [Examples] [Readings] [Bailey Docs]

Disclaimer Often, these pages were created "on the fly" with little, if any, proofreading. Any or all of the information on the pages may be incorrect. Please contact me if you notice errors.

Source text last modified Tue Oct 7 17:12:18 1997.

This page generated on Wed Nov 5 12:38:45 1997 by SiteWeaver.

Contact our webmaster at rebelsky@math.grin.edu