Magic no in java programming
Answers
Answered by
0
Answer:
no that not magic in java
Answered by
4
Answer:
import java.util.Scanner;
class MagicNum
{
public static void main()
{
Scanner in=new Scanner(System.in);
int n;
System.out.println("Enter a number");
n=in.nextInt();
if(n%9==1)
System.out.println("Magic Number");
else
System.out.println("Not a Magic Number");
}
}
Explanation:
Similar questions