19th Jan 2019, 10:40 AM
Jefferson Villanueva
Jefferson Villanueva - avatar
5 Answers
+ 2
In line 16 after n[2] you need << and then the "," and you typed [3] instead of n[3]
19th Jan 2019, 11:09 AM
gil gil
+ 1
And in for loop you writed 1 <5 which is always true so its an infinite loop :)
19th Jan 2019, 11:13 AM
gil gil
+ 1
Yea its good,you got an array and an index variable ,so its a good code,you can use a loop to display the numbers but it dosn't matter much because its a short array
19th Jan 2019, 2:24 PM
gil gil
0
gil gil got it! I change the 1<5 to i <5. and it works. thanks! also this is the question. can you check if my code is ok with this question? Write a program that will accept five (5) integers and display them to the users. You are limited to using only two (2) variables (including the array).
19th Jan 2019, 2:20 PM
Jefferson Villanueva
Jefferson Villanueva - avatar
0
gil gil thank you so much 👍
19th Jan 2019, 2:26 PM
Jefferson Villanueva
Jefferson Villanueva - avatar