import java.io.*;
class Enen
{
int i,n,m,flag;
BufferedReader br=new
BufferedReader(new InputStreamReader(System.in));
public void show() throws
Exception
{
flag=0;
for(i=0;i<10;i++)
{
System.out.println("Enter number:");
n=Integer.parseInt(br.readLine());
if(n%2==0)
flag++;
else
flag=0;
if(flag==1)
m=n;
if(flag==2)
{
System.out.println("Consecutive
even entries="+m+" "+n);
flag=0;
}
}
}
public static void
main(String args[])throws Exception
{
Enen ob=new Enen();
ob.show();
}
Your site is very good.
ReplyDeleteYour site is very useful.
ReplyDelete