DEV Community

Ezoza
Ezoza

Posted on

Selection statements | Difference between if else and if.

Selection statements
if statement if~else
statement


.2 yoki undan kop execution path larni tanlaydi

if ( a > = 0 )
cout << "positive"
if ( a < 0 )
cout << "negative"


IF STATEMENT
. if expression is true exekute statement
syntax


IF-ELSE STATEMENT
if expession is true execute statement 1.if false execute statement 2

Top comments (1)

Collapse
 
jonrandy profile image
Jon Randy ๐ŸŽ–๏ธ • Edited

0 is not positive or negative