C++ examples for Operator:Conditional Operator
What does the following program print: while loop and tenary operator
#include <iostream> using namespace std; int main() /*from w ww . j a v a 2 s . co m*/ { int count = 1; // initialize count while ( count <= 10 ) // loop 10 times { cout << ( count % 2 ? "****" : "++++++++" ) << endl; ++count; // increment count } }