Computer Science, asked by TheVerifiedQuestion, 28 days ago

Java Program to print 1 to 100​

Answers

Answered by sharmatirth00007
1

Answer:

10 20 30 40 50 60 70 80 90

Explanation:

tu noob ha be

Answered by tejeswarteju
3

Explanation:

public class DisplayEvenNumbersExample1

{

public static void main(String args[])

{

int number=100;

System.out.print("List of even numbers from 1 to "+number+": ");

for (int i=1; i<=number; i++)

{

//logic to check if the number is even or not

//if i%2 is equal to zero, the number is even

if (i%2==0)

{

System.out.print(i + " ");

}

}

}

}

Similar questions