i3 = 0; j3 = 0; k3 = 0; while i3<=n while k3<=(n-i3-1) fprintf(" ") k3 = k3 + 1; endwhile k3 = 0; while j3<(2*i3-1) fprintf("*") j3 = j3+1; endwhile j3 = 0; i3 = i3+1; fprintf("\n") endwhile
rows = 5; r = 0; while r < 5; x = -rows; while x <= rows if ( (x >= -r) && (x<= r) && mod(r,2) == mod(x,2)) fprintf("*") else fprintf(" ") endif x = x + 1; endwhile fprintf("\n") r = r + 1; endwhile
Quote:How can I change this to a pyramid?
____* ___*_* __*_*_* _*_*_*_* *_*_*_*_*
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)