question archive In a single project USING C#, code the following methods and call them from your main Declare the following arrays in your main method char[] letters = "the quick brown fox jumps over the lazy dog"

In a single project USING C#, code the following methods and call them from your main Declare the following arrays in your main method char[] letters = "the quick brown fox jumps over the lazy dog"

Subject:Computer SciencePrice:3.86 Bought7

In a single project USING C#, code the following methods and call them from your main Declare the following arrays in your main method char[] letters = "the quick brown fox jumps over the lazy dog".ToCharArray(); int[] numbers = {0, 2, 3, 5, 7, 1, 1, 2, 5, 6, 7, 2, 5, 2}; string[] poem = "mary had a little lamb its fleece was white as snow".Split(); 

 

  1. In your main method display the letters array, then use the Array.Reverse() method to reverse the letters array and then again call the appropriate method to print it
  2.   In your main method use the method in question 1 to display the poem array, then use the Array.Sort() method to sort the poem array and then again call the appropriate method to print it

 

pur-new-sol

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE

Answer Preview

Source Code

 

using System;

 

public class Sample

{

public static void Main()

{

//declaration of arrays

char[] letters = "the quick brown fox jumps over the lazy dog".ToCharArray();

int[] numbers = {0, 2, 3, 5, 7, 1, 1, 2, 5, 6, 7, 2, 5, 2};

string[] poem = "mary had a little lamb its fleece was white as snow".Split();

 

//display the letters array

Console.WriteLine(letters);

 

//reverse the letters array

Array.Reverse(letters);

 

// again printing the letters array using appropriate method

Console.WriteLine(letters);

 

//display the poem array

  Console.WriteLine("{0}", string.Join(" ", poem));

 

// sort the poem array

Array.Sort(poem);

 

// again printing the poem array using appropriate method

Console.WriteLine("{0}", string.Join(" ", poem));

}

}

Please see the attached file for the complete solution

Related Questions