Write a java program to print 1, if the input is 0.
Answers
Answered by
1
Answer:
class Number
{
void accept(int n)
{
System.out.println("Enter a number="+n);
if(n==0)
System.out.println("1");
else
System.out.println("Wrong input");
}
}
Similar questions