lab09hw-nested-soln - rowsum = 0 for(int j = 0 j< 5 j Go...

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

View Full Document Right Arrow Icon
// Solution to http://php.scripts.psu.edu/djh300/cmpsc201/lab09hw-nested-for.htm #include <iostream> using namespace std; int main() { int rowsum; // Sum of numbers in each row for(int i = 0; i < 5; i++) // Go through rows
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: { rowsum = 0; for(int j = 0; j < 5; j++) // Go through columns { cout << i << '*' << j << " "; rowsum += i*j; } cout << " Sum of products in this row: " << rowsum << endl; } return 0; }...
View Full Document

This document was uploaded on 02/10/2011.

Ask a homework question - tutors are online