Java Programs
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);
}
}
}
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment