Doubt in a testcase

Suppose in this problem I give input as :

1
2
3
3
4
5

So will it be a increasing sequence?

no this is not stricly increasing.
we call such sequences as non decreasing sequence

1 Like

Ok. I have one more query. Suppose I write:

bool val = true;

so using this I will print true as:
cout<<val<<endl;

but for printing false should I write:
cout<<!val<<endl;

it will print 0 and 1.
u need to use if else to print ur true and false

yeah it is printing 1 and 0 so
should I use :
cout<<“true”<<endl;

yeah … … … …

1 Like