# Why do we use "End If" statement?

Why do we write END IF statement in this program? Without writing it, we can easily get our result. Is there any example through which you can explain me the use of END IF statement? I have tried this: INPUT X IF X>10 THEN PRINT "X IS GREATER THAN 10" ELSE PRINT "X IS NOT GREATER THAN 10" END then I am also getting expected result. The real code is: INPUT X IF X>10 THEN PRINT "X IS GREATER THAN 10" ELSE PRINT "X IS NOT GREATER THAN 10" END IF END >EXPECTED AND DESIRED FOR EXAMPLE: When X=5 Then Output will be "X IS NOT GREATER THAN 10".

## 1 Expert Answer

By:

Blackstone H. answered • 05/17/19

Tutor
5 (6)

Senior Database Developer using SQL, Visual Basic (VB)

## Still looking for help? Get the right answer, fast.

Get a free answer to a quick problem.
Most questions answered within 4 hours.

#### OR

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.