Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I am writing a program that allows the user to enter up to 10 non negative integ

ID: 3639999 • Letter: I

Question

I am writing a program that allows the user to enter up to 10 non negative integers. The input ends when the user enters -1. If i create an array 0:10, im pretty sure this just allocates space, filling in the array with ten zeros...to check for an empty array, wouldn't i have to create an array without allocating space and allow the user to determine its length based on how many times input is entered before -1? If so, how do i create an empty array, fill it with user input, and check if is is empty ?

Explanation / Answer

search for -1 in the given array for(i=0;i
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote