Download presentation
Presentation is loading. Please wait.
Published byAlberto Olney Modified over 9 years ago
1
Triana Elizabeth, S.Kom
2
#include using namespace std; void main () { for (int i = 1; i <= 9; i++) { for (int j =1; j <=6; j++) { if (i 10-j) { cout<<" "; } else { cout<<"*"; } cout<<endl; } _getch(); } * * * * * * * * * * * * * * * * *
4
* * * * * * * * * * * * * * * * Algoritma Bentuk_Bintang { Menampilkan Bentuk Bintang } DEKLARASI i, j : integer DESKRIPSI : for i 1 to 9 do for j 1 to 6 do if (i 10-j) then write (‘ ’) else write (‘*‘) endif endfor write (enter) endfor
5
* * * * * * * #include using namespace std; void main () { for (int i = 1; i <= 7; i++) { for (int j =1; j <=7; j++) { if (j==i || j== 8-i) { cout<<"*"; } else { cout<<" "; } cout<<endl; } _getch(); }
7
* * * * * * * Algoritma Bintang_Silang { Menampilkan Bintang Berbentuk Silang } DEKLARASI i, j : integer DESKRIPSI : for i 1 to 7 do for j 1 to 7 do if (j = i or j = 8-i) then write (‘*’) else write (‘ ‘) endif endfor write (enter) endfor
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.