WAP that if the input is 0 , then the output should be 1 in java.
Answers
Answered by
0
Answer:
import java.util.*;
import java.util.scanner;
class Program
{
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
int i=sc.nextInt();
Stirng s=i>0?"0":"1":
System.out.println(s);
}
}
Similar questions
India Languages,
3 months ago
Science,
3 months ago
English,
3 months ago
Math,
6 months ago
Hindi,
6 months ago
Math,
10 months ago
Computer Science,
10 months ago