You are on page 1of 15

Decisions

BY : MOSTAFA ASHRAF
Some definitions

 * AND “ & & “ like series switch .


 * OR “ || “ like parallel switch .
 * NOT “ ! “ converter
 * sizeof ()
 * equal “ == “
 * NOT equal “ != “
* larger or equal “ >= “ * Adress of operator ( & )
* smaller or equal “ <= “ * larger “>” * smaller ”<“
switch ternary operator if statements
IF Condition :
1- Write a C++ program that designs a calculator . 

The program should read from the user two integer numbers and a 
character which indicates the type of operation desired.

* MORE example from sheet . 


Switch :
Ternary operator:
1- How can you find the minimum/maximum of three numbers using the 
conditional operator ,in just one line ?
Hint : Google for ternary operator in C++ 

You might also like