Java program to find odd or even number | Only for Beginners

preview_player
Показать описание


Follow on Facebook:

Subscribe to our other channel:
Telusko Hindi :
Рекомендации по теме
Комментарии
Автор

import java.util.Scanner;
public class EvenOrodd
{
public static void main()
{
Scanner scan = new Scanner(System.in);
int i = scan.nextInt();
if (i%2==0) {
System.out.println("It's even");
}
else {
System.out.println("It's odd");
}
}
}

RealTrump
Автор

Just found out 0 is an even number so, how would you make it log "zero" instead of "even"?

miguelXortiz
Автор

How to get output using command line argument please make a video on command line argument

priyalakshmanan
Автор

please add the program solution of twin prime numbers

hellyshah
Автор

Using interface plzz tell java program

BCS-NKaviya
Автор

Sir what if i enter number zero? But my teacher said when you enter a zero it should be only Zero so what is the solution for that? Please help!

khalilramos
Автор

I really appreciate that your lecturing. Why don't you keep going this?  ^_^

limsoyoun
Автор

How do I add a return statement???? My java told me that I have to add a return statement inside

KansasFashion
Автор

How do I write a program that will let you continue entering numbers until an even number is enter and will say even number was entered

danielsanchez
Автор

10 is odd for me so is any number ending in zero

alayonjosh
welcome to shbcf.ru