ini adalah deret kelipatan 3, hmm agak bingung juga sih maunya dia deret kelipatan dari 1,4,7,10,13 atau 1,3,6,9,12. Jadi aku kasi aja semunya hehehhe
versi : 1,4,7,10,13
versi : 1,3,6,9,12
versi : 1,4,7,10,13
import java.util.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class DeretKelipatanTiga
{
public static void main(String[] args) throws IOException
{
int tinggi, setengahTinggi;
String input;
System.out.print("Masukkan batas: ");
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
input = br.readLine();
tinggi = Integer.parseInt(input);
int n=tinggi;
for (int i=1;i<=n;i=i+3)
{
System.out.println(i);
}
}
}
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class DeretKelipatanTiga
{
public static void main(String[] args) throws IOException
{
int tinggi, setengahTinggi;
String input;
System.out.print("Masukkan batas: ");
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
input = br.readLine();
tinggi = Integer.parseInt(input);
int n=tinggi;
for (int i=1;i<=n;i=i+3)
{
System.out.println(i);
}
}
}
versi : 1,3,6,9,12
import java.util.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class DeretKelipatanTiga
{
public static void main(String[] args) throws IOException
{
int tinggi, setengahTinggi;
String input;
System.out.print("Masukkan batas: ");
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
input = br.readLine();
tinggi = Integer.parseInt(input);
int n=tinggi;
int x=1;
System.out.println(x);
for (int i=3;i<=n;i=i+3)
{
System.out.println(i);
}
}
}
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class DeretKelipatanTiga
{
public static void main(String[] args) throws IOException
{
int tinggi, setengahTinggi;
String input;
System.out.print("Masukkan batas: ");
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
input = br.readLine();
tinggi = Integer.parseInt(input);
int n=tinggi;
int x=1;
System.out.println(x);
for (int i=3;i<=n;i=i+3)
{
System.out.println(i);
}
}
}
Update Contact :
No Wa/Telepon (puat) : 085267792168
No Wa/Telepon (fajar) : 085369237896
Email : Fajarudinsidik@gmail.com
No Wa/Telepon (puat) : 085267792168
No Wa/Telepon (fajar) : 085369237896
Email: Fajarudinsidik@gmail.com
atau Kirimkan Private messanger melalui email dengan klik tombol order dibawah ini :