Answer to Question #3110 in Delphi | Pascal for annabelle

Question #3110
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.

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS