I need help with a programming assignment

  1. Paste the following code into the main() method.  Modify the code; so that it works (You’ll have to make 2 small modifications).  It should output the value of each string in the array called names.

string[] names = { “Al Dente”, “Anna Graham”, “Earle Bird”, “Ginger Rayle”, “Iona Ford” };

int i = 0;

while (i < names.Length)




2. Modify the code from problem 1, so that it outputs a number and then a person’s name using the following output statement.

Console.WriteLine(“{0,2}. {1}”, i, names[i]);

3. Modify the code from problem 6, so that it uses a foreach loop as opposed to a while loop.  The output should appear exactly the same as it did after step 2.

"Order a similar paper and get 100% plagiarism free, professional written paper now!"

Order Now