1. Tampilan
1020201010202010
Source Code
int i,k,j;
for(i=1; i<=2; i++)
{
for(k=1; k<=2; k++)
{ System.out.print(k+"0");}
for(j=2; j>=1; j--)
{ System.out.print(j+"0"); }
}
2. Tampilan (piramida terbalik bilangan ganjil)
55555
333
1
1020201010202010
Source Code
int i,k,j;
for(i=1; i<=2; i++)
{
for(k=1; k<=2; k++)
{ System.out.print(k+"0");}
for(j=2; j>=1; j--)
{ System.out.print(j+"0"); }
}
2. Tampilan (piramida terbalik bilangan ganjil)
55555
333
1
source code
3. Tampilan Rata Kanan
1
1
12
123
23
1
Source Code
4. Tampilan
5. Tampilan
*
**
***
****
*****
Source Code
int i,k;
for(i=1; i<=5; i++)
{
for(k=1; k<=i; k++)
{ System.out.print("*");
}
System.out.println();
for(i=1; i<=5; i++)
{
for(k=1; k<=i; k++)
{ System.out.print("*");
}
System.out.println();
}
Segitu dulu ye, moga bermanfaat, tar di tambah lagi, mau belajar buat semester ALANISA DAN PROSES BISNIS...
------------------------------------------------****Wish me luck ea.....**-------
------------------------------------------------****Wish me luck ea.....**-------
Weeewww, yoo agek aku kasihhh yyeee Tugas nyo buk mely..hahaha :P
ReplyDeletewewew... makasih komentnya
ReplyDeleterajin2 mampir ye ke blog ane, wakakakaw...