Lab6Loops

Lab6Loops - Lab: Write a program to compute 1! + 2! + 3! +...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Pre-lab: What are nested loops? Give an example where a nested loop is typically used. Write a program to print out the following: (1, 1) (1, 2) (1, 3) (1,4) (1, 5) (1, 6) (1, 7) (2, 1) (2, 2) (2, 3) (2, 4) (2, 5) (2, 6) (2, 7) (3, 1) (3, 2) (3, 3) (3, 4) (3, 5) (3, 6) (3, 7) (4, 1) (4, 2) (4, 3) (4, 4) (4, 5) (4, 6) (4, 7) (5, 1) (5, 2) (5, 3) (5, 4) (5, 5) (5, 6) (5, 7) (6, 1) (6, 2) (6, 3) (6, 4) (6, 5) (6, 6) (6, 7)
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Lab: Write a program to compute 1! + 2! + 3! + . .. 10! look for Factorial online if you are not familiar with the symbol '!' Use loop to print out the following matrix, make your code as simple as possible 1 1 2 3 4 5 6 2 1 2 3 4 5 6 3 2 3 4 5 6 1 4 3 4 5 6 1 2 5 4 5 6 1 2 3 6 5 6 1 2 3 4 (optional) write a program to print out the following: % %%% %%%%% %%%%%%% %%%%% %%% %...
View Full Document

This note was uploaded on 12/27/2011 for the course CMPSC 5 taught by Professor Franklin during the Fall '09 term at UCSB.

Ask a homework question - tutors are online