RSS

java bintang segi tiga

public class LatWhile
{
public static void main(String args[])
{
int bilangan = int x= Integer.parseInt(Args[0]); ;
int x = 2;
int hasil = 1;
while(x>o)
{
System.out.print(hasil + " * " + x + " =");
hasil = hasil*x;
System.out.println(hasil);
x++;
}

System.out.println( bilangan + " ! = " +hasil);
}
}

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

0 komentar:

Posting Komentar