answersLogoWhite

0


Best Answer

In Java:

System.out.println("Even numbers")
for (int i = 2; i <= 100; i += 2) System.out.println(i);
System.out.println("Odd numbers")
for (int i = 1; i <= 100; i += 2) System.out.println(i);

In Java:

System.out.println("Even numbers")
for (int i = 2; i <= 100; i += 2) System.out.println(i);
System.out.println("Odd numbers")
for (int i = 1; i <= 100; i += 2) System.out.println(i);

In Java:

System.out.println("Even numbers")
for (int i = 2; i <= 100; i += 2) System.out.println(i);
System.out.println("Odd numbers")
for (int i = 1; i <= 100; i += 2) System.out.println(i);

In Java:

System.out.println("Even numbers")
for (int i = 2; i <= 100; i += 2) System.out.println(i);
System.out.println("Odd numbers")
for (int i = 1; i <= 100; i += 2) System.out.println(i);

User Avatar

Wiki User

14y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

14y ago

In Java:

System.out.println("Even numbers")
for (int i = 2; i <= 100; i += 2) System.out.println(i);
System.out.println("Odd numbers")
for (int i = 1; i <= 100; i += 2) System.out.println(i);

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a program which will display the list of even and odd numbers?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What Program that will display the even numbers in data structures and algorithms?

JAVA


Q2 Write a program to print even numbers between 10 and 50?

You can use int i; for (i = 10; i &lt;= 50; i += 2) {//print i} as a program to print even numbers between 10 and 50.


Write a c program to display hello on the monitor without using printf?

You can choose from puts, fputs, fwrite, write (or even putchar, putc, fputc). I hope this will help you to start.


Write a java program to find sum of even and odd numbers in given array?

for(int i = 1; i &lt; 100; i+=2) { System.out.println(i); }


How do you Write a C program to print a Series of Odd Numbers and Even Numbers.?

Reference:http:cprogramming-bd.com/c_page2.aspx# strange number


How do you write a do while loop in visual basic to display the produc of even numbers between 1 and 10?

i=0 do if(i/2=0) msgbox(i) while(i&lt;=10) wend


Write a Program in c to find palindrome numbers between any two numbers?

please somebody should help me answer this question..I have a project on it even! It seems almost impossible at the moment.


How will you display the number between 1 to 100 as odd or even as shown odd even or odd?

You write odd or even in brackets, but most people should know if it's odd or even as odd numbers end in 1, 3, 5, 7 or 9 and even numbers end in 2, 4, 6,8 or 0.


How do you write a program in Basic to display all the even numbers up to 100?

In visual basic: Module Module1 Sub Main() Dim Inst As Integer For Inst = 0 To 100 Step 2 Console.WriteLine(Inst) Next End Sub End Module


Write a program to print even and odd numbers in between 1 to 10?

for (int i = 2; i < 10; i ++) printf("%d\n", i); You did say even and odd numbers between 1 and 10. That's allnumbers between 1 and 10.


Write a program to find the sum of even numbers from 2 to50?

In Java:sum = 0;for (i = 2; i


Write a program in c plus plus for finding the sum of first 10 even numbers?

int i, sum = 0; for (i=0; i&lt;20; i+=2) sum+=i;