/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package latihan.pkgif.b2;
import java.util.Scanner;
/**
*
* @author Administrator
*/
public class LatihanIFB2 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
Scanner masukan = new Scanner(System.in);
System.out.println("Masukkan bilangan");
int bilangan = masukan.nextInt();
if (bilangan%2 == 0){
System.out.println(bilangan);
System.out.println("Bilangan Genap");
}
else{
System.out.print(bilangan);
System.out.println("Bilangan Ganjil");
}
}
}
Tidak ada komentar:
Posting Komentar