Jumat, 23 September 2016

Tugas Java (Perulangan)



class perulangan {
public static void main (String[] args){
for(int x=5;x>=1;x--)
{
for (int y=x;y>0;y--)
System.out.print(y);
System.out.println();
}
}
}
Contohnya seperti gambar dibawah ini:



Dan ini hasil outputnya: