c++ ? if statement syntax code example
Example: if else in C++
//1
if(condition) {
statement(s);
}
else {
statement(s);
}
//2
(condition) ? (true_statement) : (false_statement)
//1
if(condition) {
statement(s);
}
else {
statement(s);
}
//2
(condition) ? (true_statement) : (false_statement)