Back To Top

Naruto VS Sasuke,who is the strongest?

loop bahasa pascal

Posted by : Bebin Cahyadi
Program Output_Tengah_Tengah_Layar; 
 
Uses crt;
Var
  Xtengah, XGerak, N, I : Byte;
  Lagi : Char;
Begin
  Lagi:='Y';
  While (Upcase(Lagi)='Y') Do
     Begin
       clrscr;
       writeln('Banyak N : ');
       readln(N);
       A:=1;
       For I:=1 To N Do
          Begin
              K:=1;
             XGerak:=Xtengah;
             While (K<=A) Do
                Begin
                    Gotoxy(XGerak,I-1);
                    XGerak:=XGerak+1;
                    K:=K+1;
                End; {Akhir For J}
              XTengah:=XTengah-1;
              A:=A+2;
            End; { akhir For I}
            writeln;
            write('Anda Ingin Mencetak Lagi  : ');
            readln(Lagi);
        End; {Akhir while}
End.
 
 
layout :
                                       1
                                      111
                                     11111
                                    111111 
Monday, 30 June 2014

0 comments:

Visitor

Powered by Blogger.

About Me

My Photo
Bebin Cahyadi
cr7
View my complete profile

Copyright © 2012 Bebin Cahyadi | Naruto Vs Sasuke V2 Theme | Designed by Johanes DJ