In this article I would like to share with you a sample program that I wrote using Pascal as my programming language. It will create and generate an triangle image using asterisk symbol on the screen. By the way I am using Turbo Pascal 6.0 for DOS as my compiler in writing this sample program. Thank you very much.
Add me at Facebook my address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com.
My mobile number here in the Philippines is 09173084360.
Sample Program Output
Program Listing
Program Triangle_Pattern;
Uses Crt;
Const image ='*';
Var A,B :integer;
Begin
Clrscr;
For A := 1 to 10 Do
Begin
For B := 1 To 10 - A Do
write(' ');
For B := 1 To 2 * A - 1 Do
Write(Image);
writeln;
End;
Writeln;
Writeln('Triagle Pattern in Pascal');
Readln;
End.
No comments:
Post a Comment