any ten programs in java relatad to if else condition
Answers
Answered by
1
if(a>b)
System.out.println("first number is bigger");
else
System.out.println("second number is bigger");
if(a<0)
System.out.println("number is negative");
else
System.out.println("number is zeor or positive");
if(a%2==0)
System.out.println("Even");
else
System.out.println("odd");
if(marks<40)
System.out.println("fail");
else
System.out.println("passed");
System.out.println("first number is bigger");
else
System.out.println("second number is bigger");
if(a<0)
System.out.println("number is negative");
else
System.out.println("number is zeor or positive");
if(a%2==0)
System.out.println("Even");
else
System.out.println("odd");
if(marks<40)
System.out.println("fail");
else
System.out.println("passed");
Similar questions