jawab :
public class CetakBilSatuSampekLimaPulukKelipatanTiga
{
public static void main(String [] args)
{
for (int i=1;i<=50;i=i+3)
{
System.out.println(i);
}
}
}
public class CetakBilSatuSampekLimaPulukKelipatanTiga
{
public static void main(String [] args)
{
for (int i=1;i<=50;i=i+3)
{
System.out.println(i);
}
}
}
Buatkan program kelipatan 1,2,3,4,5,6,7,8,9,10.masing masing kelipatan sampai 10(misal) 2,4,6,8,10,12,13,15,17,19
BalasHapuspackage latihan;
BalasHapusimport java.util.*;
public class Perulangan {
public static void main (String args[]){ Scanner a = new Scanner (System.in);
System.out.print("MASUKKAN ANGKA : ");
int angka = a.nextInt();
for (int i = 1; i<=angka;i++){ (a)………………………
(b)……………………
System.out.println(i);
}
}
}