answersLogoWhite

0

import java.util.*;

class even{

public static void main(String[]args){

Scanner cons = new Scanner(System.in);

int even;

even = cons.nextInt();

if(even % 2 == 0)

{

System.out.println(even);

}

}

}

User Avatar

Wiki User

14y ago

Still curious? Ask our experts.

Chat with our AI personalities

BlakeBlake
As your older brother, I've been where you are—maybe not exactly, but close enough.
Chat with Blake
FranFran
I've made my fair share of mistakes, and if I can help you avoid a few, I'd sure like to try.
Chat with Fran
ViviVivi
Your ride-or-die bestie who's seen you through every high and low.
Chat with Vivi

Add your answer:

Earn +20 pts
Q: Java code that display even numbers from 0 to 10?
Write your answer...
Submit
Still have questions?
magnify glass
imp