/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package pbo;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/**
*
* @author Fandy
*/
/*
* Nama : Fandy Adam
* Stambuk : E1E1 09 053
* Tugas Mata Kuliah : PBO
* Jurusan : IT
*
* SOAL 3 : DERET ANGKA
*/
public class soal3 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws IOException {
BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
System.out.println(" Aplikasi Deret Angka ");
System.out.println("======================");
System.out.print("Masukkan nilai N : ");
int n = Integer.parseInt(input.readLine());
System.out.print("Masukkan nilai interval: ");
int interval = Integer.parseInt(input.readLine());
for(int i=0; i<=n; i=i+interval) {
System.out.print(i+" ");
}
}
}
Subscribe to:
Post Comments (Atom)






0 comments:
Post a Comment