+ 3
The input contains a sequence of positive integers not exceeding 1000
The sequense ends with -1. Total amount of numbers is not more than 100. Output total amount of numbers is the sequense (not summing -1) and than numbers themselves. Input: Sequence is not bigger that 100. (Input: 1 3 5 -1 Output: 3 1 3 5) https://code.sololearn.com/cNrprrWXvj1d/?ref=app
2 Respostas
+ 1
Two problems here:
1. Inside your for loop your condition should be just "i < 100"
2. You will need 2 loops if you want to output the size first.
Just like that:
https://code.sololearn.com/cKHJSmuXPmNX/?ref=app
+ 1
Thank you!