If Statement in Swift 3

Lets see how we can write the If statement in Swift 3
This example show how student gets pass for his subject according to marks

If student has marks over 75 he gets A pass
If student has marks less than 75 and more than 65 he gets B pass
If student has marks less than 65 and more than 55 he gets C pass
If student has marks below 55 he is failed the subject

Output
You have C Pass

Leave a Reply

Your email address will not be published. Required fields are marked *