0

How to tell java to execute even number in writing

Can someone help please in coding how to write it

24th Oct 2021, 2:25 AM
Makseem
Makseem - avatar
6 Respostas
+ 3
Loop through the numbers. A for loop is good for this. Inside the loop use an if statement to check if a number is even. To do that see if it can be divided by two without remainder. Use the modulo operator. If the number is even print it.
24th Oct 2021, 3:14 AM
Simon Sauter
Simon Sauter - avatar
+ 1
Your question is unclear. Could you explain a little more what you're trying to do? Also, please always tag the language you're asking about. https://code.sololearn.com/W3uiji9X28C1/?ref=app
24th Oct 2021, 2:36 AM
Simon Sauter
Simon Sauter - avatar
+ 1
Makseem The numbers which are multiple of 2 that would be even numbers. I think you know how to check any number is a multiple of 2.
24th Oct 2021, 3:13 AM
A͢J
A͢J - avatar
0
How to print even numbers in jaca
24th Oct 2021, 2:42 AM
Makseem
Makseem - avatar
0
Java**
24th Oct 2021, 2:42 AM
Makseem
Makseem - avatar
0
May I know where to find even numbers whether it is in loop or array or some other else
24th Oct 2021, 5:37 PM
sree harsha
sree harsha - avatar