Computer Science, asked by shraddha0608200488, 10 months ago

write a program to check if it is dibs number for not a number contains 0 4 and 7 it is a dibs number..plzz do it in java​

Answers

Answered by sujalagarwal0987
2

Answer:

public class dibs_number

{

public static void main(int n)

{

int a=n;

while(a!=0)

{

int r=a%10;

a/=10;

if(r==0||r==4||r==7)

{

System.out.println(n);

break;

}

}}}

Explanation:

hope it helps you.....you can do it by scanner or buffered reader also

Similar questions