[cs23021] lab 3

Mikhail Nesterenko mikhail at cs.kent.edu
Tue Sep 21 23:01:34 EDT 2010


> im trying to get the last part of triangles for lab 3 to work ...
>

Consider rewriting your code with for-loops. It will simplify
signficantly. You'll only need two nested for-loops, only two
loop variables (one per for-loop) and an if-statement instide the
inner for-loop. Here is the pseudocode:

for loop counting rows
    for loop couting characters in a row
        if (the character number is less than row number)
	    print space
        else
	    print star


Thanks,
--
Mikhail


More information about the cs23021-2 mailing list