Write a program that asks the user to enter the number of stars per row and the number of rows to be displayed. for example, entering 5 and 3 should display:
*****
*****
*****
1
Expert's answer
2011-06-20T12:16:27-0400
uses crt; var rows,stars,i,j: integer;
begin & write('Enter number of stars: '); & readln(stars); & write('Enter number of rows: '); & readln(rows);
& for i:=1 to rows do & begin for j:=1 to stars do & write('*'); writeln; & end; & write('Press Enter to exit...'); & readlnFF; end.
Comments
Leave a comment