.: Java :. Perulangan dengan for

package Looping;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

/**
*
* @author Nurul C.
*/
public class Perulangan_for {

public static void main(String[] args) throws IOException {

BufferedReader c= new BufferedReader(new InputStreamReader(System.in));
int in=0;
String m;
System.out.print(“Anda ingin mengulang berapa kali..??  “);
m=c.readLine();
in=Integer.parseInt(m);

String tampil = “N.U.R.U.L..C.H.U.M.A.I.D.A.H, 2011420007”;
int n=0;

System.out.println(“Silahkan check Nama dan NIM, apakah sudah ada dalam daftar..!!”);
System.out.println(“——————————————————–“);

for(n=0;n<=in;n++){
System.out.println(tampil= “N.U.R.U.L..C.H.U.M.A.I.D.A.H, 2011420007”);
}
System.out.println(“Trima kasih, Nama anda sudah ada dalam daftar ^_^”);

}
}

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s