C++ examples for Statement:while
What is the output of the program: nested while loop and tenary operator
#include <iostream> using namespace std; int main() {//from w ww . jav a 2 s . c o m unsigned int row{10}; while (row >= 1) { unsigned int column{1}; while (column <= 10) { cout << (row % 2 == 1 ? "<" : ">"); ++column; } --row; cout << endl; } }