09-10 Class Notes CS 10 - 40 48 56 64 72 80 9 18 27 36 45...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Announcements: Sorry I was late to class! Happy Eid! … and … no wireless mic today, so pretend I'm saying this…. Questions? Last Time: … we left off with "for" loops Review of assignment description Counting for a single loop counting with nested loops Example: multiplication table. The program shown below gives as output: 1 2 3 4 5 6 7 8 9 10 2 4 6 8 10 12 14 16 18 20 3 6 9 12 15 18 21 24 27 30 4 8 12 16 20 24 28 32 36 40 5 10 15 20 25 30 35 40 45 50 6 12 18 24 30 36 42 48 54 60 7 14 21 28 35 42 49 56 63 70 8 16 24 32
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 40 48 56 64 72 80 9 18 27 36 45 54 63 72 81 90 10 20 30 40 50 60 70 80 90 100 Done. public class forLoopExample { public static void main(String args) { // same as above, only in a "for" loop for( int row=1; row <= 10; row++) { for( int col=1; col <= 10; col++) { System.out.printf(" %3d", row * col); } more on "for" loops:-Today: 09-10 Class Notes CS 10 Friday, September 10, 2010 4:12 PM 107 Fall 2010 Page 1 System.out.println(); } System.out.println("Done."); }//end main() } 107 Fall 2010 Page 2...
View Full Document

This note was uploaded on 02/10/2012 for the course COP 2271 taught by Professor Reed during the Fall '10 term at University of Central Florida.

Page1 / 2

09-10 Class Notes CS 10 - 40 48 56 64 72 80 9 18 27 36 45...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online