0% found this document useful (0 votes)
3 views2 pages

Import Java

java mport
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views2 pages

Import Java

java mport
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

import [Link].

*;

public class Aku {

/**
* Frastio Oktaviano Amchory
* absen 11
* 2 Elektro A
*/
public static void main(String[] args) throws IOException {
[Link]("Masukan sembarang angka: ");
String temp;
int bilangan = 0;
InputStreamReader isr = new InputStreamReader ([Link]);
BufferedReader br = new BufferedReader (isr);
temp = [Link]();
try {
bilangan = [Link](temp);
} catch (NumberFormatException nfe) {
[Link]("Data yang dimasukan "+"bukan suatu Angka");
[Link](1);
}
int y = bilangan % 2;
if (y > 0 ) {
[Link]("Bilangan yang Anda masukan Angka Ganjil");
}
else {
[Link]("Bilangan yang Anda masukan Angka Genap");

}

}
}

You might also like