write a program in java to print even numbers from 'm' to 'n'
Answers
Answered by
5
import java. util.*;
class even
{
public static void main(String args[])
{
int m, n;
Scanner sc=new Scanner(System.in);
System. out. println("enter the limits");
m=sc.nextInt();
n=sc.nextInt();
for(int i=m; i<=n; i++)
{
if( i%2==0)
{
System. out. print( i+"," );
}
}
}}
#sumedhian ❤❤
Answered by
4
Answer:
see attachment it's your answer please mark this answer as brainliest and give me thanks for answering.
Attachments:
Similar questions