write a program to print only even numbers between 1 to 20 using do-while loop( ) in java
Answers
Answered by
7
Answered by
2
Answer:
import java.util .*;
class even
{
public static void main (string args [])
{
int a;
system.out.println ( " Even Number from 1 to 20:") ;
for ( a=1 ; a<=20 ; a++)
system.out.println (a) ;
}
}
Similar questions
Accountancy,
2 months ago
Chemistry,
2 months ago
Hindi,
4 months ago
Math,
4 months ago
Computer Science,
11 months ago
Math,
11 months ago
English,
11 months ago