Swift Program to Demonstrate the Logical OR (||) Operator

You are currently viewing Swift Program to Demonstrate the Logical OR (||) Operator

Swift program to demonstrate the logical OR (||) operator

// Swift program to demonstrate the
// logical OR (||) operator

import Swift;

var num1=10;
var num2=50;
var num3=10;

if(num1==num2 || num1==num3)
{
    print("Hello");
}
else
{
    print("Hii");
}

Output

Hello

...Program finished with exit code 0
Press ENTER to exit console.

Ranjith

Hi, I'm Manoj a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coding Diksha. Here, I post about programming to help developers.

Leave a Reply