Please tell how to debug this one......and also tell the difference between"else","else if" and when to use it?
Attachments:
Answers
Answered by
1
public class divisible
{
public static void main(int num)
{
if(num%5==0)
{
System.out.println("yes");
}
else
{
System.out.println("no");
}
}
}
{
public static void main(int num)
{
if(num%5==0)
{
System.out.println("yes");
}
else
{
System.out.println("no");
}
}
}
pratikturkar306:
u have opened a bracket after if but u have not closed it..........this is a program of if else control structure and it is not of if else if control structure....
Similar questions