diff options
Diffstat (limited to 'ee1301/wk2/hw2_directory/strap012_HW2A.cpp')
-rw-r--r-- | ee1301/wk2/hw2_directory/strap012_HW2A.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/ee1301/wk2/hw2_directory/strap012_HW2A.cpp b/ee1301/wk2/hw2_directory/strap012_HW2A.cpp index 3129241..34c4d2a 100644 --- a/ee1301/wk2/hw2_directory/strap012_HW2A.cpp +++ b/ee1301/wk2/hw2_directory/strap012_HW2A.cpp @@ -34,12 +34,10 @@ do { } if (countOG > 0) { - count=1; //Sets initial printing of countOG to 1 - for (i=1; i<=countOG; i++) { - for (j=0; j<count; j++) { - cout << i; + for (count=1; count<=countOG; count++) { + for (i=0; i<count; i++) { + cout << count; } - count++; cout << endl; } } |