PLEASE ALWAYS USE CODE TAGS (the <> formatting button), to the right of this box, when posting code. Along with the proper indenting it makes it easier to read your code and also easier to respond to your post. http://www.cplusplus.com/articles/jEywvCM9/ http://www.cplusplus.com/articles/z13hAqkS/ Hint: You can edit your post, highlight your code and press the <> formatting button. This will not automatically indent your code. That part is up to you. You can use the preview button at the bottom to see how it looks. I found the second link to be the most help. |
if (n[0] < n[1] < n[2] < n[3] < n[4])
, but it does not. You need something more like: if (n[0] < n[1] && n[1] < n[2] && n[2] < n[3])
.int n[100]
. Do you really want to write an if statement to check all 100 elements?if (n[0] < n[1] < n[2] < n[3] < n[4])
if ((((n[0] < n[1]) < n[2]) < n[3]) < n[4])
n[0] < n[1]
. The result is a boolean value (true or false)
|
|
if (n[0] < n[1] && n[1] < n[2] && n[2] < n[3] && n[3] < n[4])
|
|
i haven't understand how to paste my code on this platform by using code tag. |
|
|
|
|
|
|