Answers for "enable if c++"

C++
1

in c++ ++ how to write if without if

(expression 1) ? expression 2 : expression 3 ---->If expression 1 is
evaluates to true, then the expression 2 is evaluated else then the expression 3
is evaluated.
Example :
  int s = (20 >= 2) ? 30 : 40;
   cout << s ;  //prints 30
Posted by: Guest on July-09-2021
0

how to do if command in c++

#include <iostream>

include namespace std;

int main() {
	int flourBagCount = 16;

 	if (flourBagCount < 15) {
		cout << "There are not enough bags of flour in inventory."
	} else {
		cout << "There are enough bags of flour in inventory."
	}
}
Posted by: Guest on August-19-2021

Browse Popular Code Answers by Language