JAVA BASIC ODD or EVEN Numbers

Go down

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

Post by CjConz on 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");
}
}
}
}

____________________________
JAVA BASIC ODD or EVEN Numbers 1738250571
CjConz
CjConz
:Moderator:
:Moderator:

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

View user profile

Back to top Go down

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

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

Very Happy cool

____________________________
[You must be registered and logged in to see this link.]

ADMIN
Admin
Admin
Admin
Admin

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

View user profile

Back to top Go down

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

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

hahaha salamat

____________________________
JAVA BASIC ODD or EVEN Numbers 1738250571
CjConz
CjConz
:Moderator:
:Moderator:

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

View user profile

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