write a program to check whether the number is micro number or not? plz answer fast
Answers
Answered by
6
Answer:
bluej program:
import java.util.*;
class micro
{
public static void main()
{
Scanner sc= new Scanner(System.in);
System.out.println("enter an integer");
int n=sc.nextInt(),flag=0;
while(n>0)
{
int ld=n%10;
if(ld%2==0)
{
flag=1;
break;
}
n=n/10;
}
if(flag==1)
System.out.println("the number is micro");
else
System.out.println("the number is not micro");
}
}
Explanation:
Similar questions