Rabu, 11 November 2015
package segitiga;
public class Segitiga {
public static void main(String[] args) {
// TODO code application logic here
System.out.println("SEGITIGA KANAN");
for (int a=1; a<=5; a++) {
for (int b=1; b<=a-1; b++) {
System.out.print("*");
}
System.out.println("*");
}
System.out.println("\n");
System.out.println("SEGITIGA KIRI");
for (int a=1; a<=5; a++) {
for (int c=1; c<=5-a; c++){
System.out.print(" ");
}
for (int b=1; b<=a-1; b++){
System.out.print("*");
}
System.out.println("*");
}
System.out.println("\n");
System.out.println("SEGITIGA PENUH");
for (int a=1; a<=5; a++) {
for (int c=1; c<=5-a; c++) {
System.out.print(" ");
}
for (int d=1; d<=a-1; d++) {
System.out.print("*");
}
for (int b=1; b<=a-1; b++) {
System.out.print("*");
}
System.out.println("*");
}
}
}
Related Posts:
Video liburanku Klik link ini untuk melihat Daftar Arsip Saya.… Read More
Program C++ saat uas #include <iostream.h>//mendefinisikan cin,cout,endl,strcmp,strupr #include <stdio.h> //mendefinisikan gets,fopen,fwrite,fclose,fread,printf #include <conio.h>//mendefinisikan textcolor,getch,cprint,cl… Read More
ASIA ENGLISH DEBATE OPEN RECRUITMENT "Show your skill" … Read More
BP3 P2 ASIA #CAA (SUPER BIHUN AAA) Klik link ini untuk melihat Daftar Arsip Saya.… Read More
Cara Configurasi WEB, FTP & MAIL Server Di Packet Tracer Server adalah perangkat yang berfungsi menerima permintaan HTTP / HTTPS dari client yang dikenal dengan web browser dan mengirimkan kembali hasilnya dalam bentuk halaman-halaman web yang umumnya berbentuk document HTML. … Read More
0 komentar:
Posting Komentar