1. Home
  2. /
  3. Blog
  4. /
  5. الشرط الثلاثي في c++
C++

الشرط الثلاثي في c++

October 1, 2022 1 min read 2,278
الشرط الثلاثي في c++

	// ternary conditional

       // variable and vlue
	int mark;
	cin>>mark;

	     // condition ? value if true : value of false
	cout<<( mark >=50 ? "  pass " :   "  fail " ) <<endl;
	
Share:
Read next

Related articles