View the step-by-step solution to:

l/set up to add all movie types together int moveNuml = new int[3] {movie1,movie2,movie3}; for (int i = 0; i < moveNum1.Length; i++) { int...

Hey I need help fixing my for loop? I can't get them to add up my number array.

Screen Shot 2018-05-14 at 11.22.40 PM.pngScreen Shot 2018-05-14 at 11.06.04 PM.png

Screen Shot 2018-05-14 at 11.06.04 PM.png

l/set up to add all movie types together
int moveNuml = new int[3] {movie1,movie2,movie3};
for (int i = 0; i < moveNum1.Length; i++) { int movieSum = moveNum1[i]; //Set up a conditional
if (movieSum >= 166) {
Console.writeLine("wow, I am impressed with your collection of " + movieSum + “ moviesl");
}
// conditonal set in case the First one is not effective
else
{
Console.WriteLine("You have a total of " + movieSum + " movies in your collection");
}

Screen Shot 2018-05-14 at 11.22.40 PM.png

Console.writeLine("\r\n Add Them Up");
//array for movies
int movieNuml = new int[3];

Top Answer

The problem with your code is, you have the following code inside the loop int movieSum =... View the full answer

Sign up to view the full answer

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question
Ask a homework question - tutors are online