ternary conditional in c++
// ternary conditional
// variable and vlue
int mark;
cin>>mark;
// condition ? value if true : value of false
cout<<( mark >=50 ? " pass " : " fail " ) <<endl;
// ternary conditional
// variable and vlue
int mark;
cin>>mark;
// condition ? value if true : value of false
cout<<( mark >=50 ? " pass " : " fail " ) <<endl;