How to counts the number of ascending arrays in one-dimensional array ? (Sorry my bad english) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to counts the number of ascending arrays in one-dimensional array ? (Sorry my bad english)

n=8 Input: 6 4 6 3 12 18 9 11 Output: 6 4 6 (1) 3 12 18 (2) 9 11 (3) Asending array is: 3 https://code.sololearn.com/cHdJCNi9kpxU/?ref=app

6th Jan 2020, 7:44 AM
Tài Nguyễn.G
Tài Nguyễn.G - avatar
2 Answers
+ 1
:(, how to fix this and how to counts the number of ascending arrays, thank you
6th Jan 2020, 9:38 AM
Tài Nguyễn.G
Tài Nguyễn.G - avatar
0
Thanks, I think my code reads from a[0] to a[7], with n = 8 {0,1..7}
6th Jan 2020, 9:26 AM
Tài Nguyễn.G
Tài Nguyễn.G - avatar