sofiadaniela0000
sofiadaniela0000 sofiadaniela0000
  • 17-11-2020
  • Computers and Technology
contestada

JAVA
Use a for loop to print the even numbers between 1 and 50, including the first even number, and the number 50. Print each number on a new line.

Respuesta :

Cytokine
Cytokine Cytokine
  • 17-11-2020

public class JavaApplication65 {

   

   public static void main(String[] args) {

       for (int i = 1; i <= 50; i++){

           if (i % 2 == 0){

               System.out.println(i);

           }

       }

   }

   

}

I hope this helps!

Answer Link

Otras preguntas

When ordering the kids lunch at burger universe , the customer must choose a size , a type of bun, a side order , and a type of fruit drink
A dot ran from -34 to -66. What distance did it cover? If this run took the dot 5 minutes, what was the average speed?
The nurse in pediatric intensive care is caring for an infant whose respiratory rate is 50 with nasal flaring, grunting and experiencing thick yellow nasal disc
And animal without a body cavity is called
Describe three types of encoding people use to input information into the nervous system answers
The hormone ________ exerts a defeminizing action during prenatal development.
Waves that move the particles of the medium parallel to the direction in which the waves are traveling are called a. longitudinal waves. b. transverse waves. c.
How is a protein like a car engine? EXPLAIN.
What is the average alcohol content of beer by volume?
How does penelope first respond to eurycleia upon hearing the news?