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"
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();
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