+1 vote
in Class 12 by kratos

Find the errors from the following code:

if (a>b)

print a:

else if (a<b)

print b:

else

print “both are equal”

1 Answer

+4 votes
by kratos
 
Best answer

if (a>b) // missing colon

print a:

else if (a<b) // missing colon // should be elif

print b:

else // missing colon

print “both are equal"

...