Java Programs
Showing posts with label
print even number
.
Show all posts
Showing posts with label
print even number
.
Show all posts
Thursday, 13 June 2013
program for - print even number with the help of for loop
import java.io.*;
class simple_even_print_with_for_loop
{
public static void main(String args[])
{
for(int i=1;i<=50;i++)
{
if(i%2==0)
System.out.println(i);
}
}
}
Older Posts
Home
Subscribe to:
Posts (Atom)