THE NEW ERA ZONE
Would you like to react to this message? Create an account in a few clicks or log in to continue.

JAVA BASIC ODD or EVEN Numbers

2 posters

Go down

JAVA BASIC ODD or EVEN Numbers Empty JAVA BASIC ODD or EVEN Numbers

Post by CjConz Mon Apr 14, 2014 1:35 pm


import java.io.*;
public class oddeven {
public static void main(String[] args) throws IOException {
oddeven io= new oddeven();
io.odd_even();

}
void odd_even() throws IOException{
BufferedReader br =new BufferedReader (new InputStreamReader (System.in));
System.out.print("Enter number: ");

int number = Integer.parseInt(br.readLine());{

if(number%2 == 0){
System.out.println("Even number");
}

else {
System.out.println("Odd number");
}
}
}
}
CjConz
CjConz
:Moderator:
:Moderator:

Posts : 56
Points : 82
Join date : 2014-04-01
Age : 36

Back to top Go down

JAVA BASIC ODD or EVEN Numbers Empty Re: JAVA BASIC ODD or EVEN Numbers

Post by Admin Mon Apr 14, 2014 1:48 pm

Very Happy cool
Admin
Admin
Admin
Admin

Posts : 11
Points : 9
Join date : 2014-03-31
Age : 31
Location : PHILIPPINES

Back to top Go down

JAVA BASIC ODD or EVEN Numbers Empty Re: JAVA BASIC ODD or EVEN Numbers

Post by CjConz Mon Apr 14, 2014 1:52 pm

hahaha salamat
CjConz
CjConz
:Moderator:
:Moderator:

Posts : 56
Points : 82
Join date : 2014-04-01
Age : 36

Back to top Go down

JAVA BASIC ODD or EVEN Numbers Empty Re: JAVA BASIC ODD or EVEN Numbers

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum