lundi 2 décembre 2019

I need help about a code I cant understand how to do it's in c++ I cant understand the logic, and how to do it in code

The console reads an integer m, then some integers. Print the lengths of the sequence of numbers consisting of at least m consecutive elements to which each future number applies is greater than the preceding number. For example. if number m = 2 (minimum sequence length) and give the integers: 1, 2, 3, 2, 0, 5, 7,9,10, 2, 3 One sequence of numbers is: 1, 2, 3 --- length 3> = m (each subsequent element> than preceding this sequence). next: 5, 7,9,10 --- length 4> = m and: 2, 3 --- length 2> = m Only the lengths should be printed on the screen : 3 4 2 I need help

Aucun commentaire:

Enregistrer un commentaire