Professional Documents
Culture Documents
1A
A one-dimensional array that contains six (6) names of your classmates. Then, print the
names using a foreach loop.
using System;
using System.Collections.Generic;
namespace ConsoleApp7
{
class Program
{
static void Main(string[] args)
{
A two-dimensional array with two (2) rows and three (3) columns. Then, initialize the array
with the first six (6) letters of the alphabet as its elements.
using System;
using System.Collections.Generic;
namespace ConsoleApp7
{
class Program
{
static void Main(string[] args)
{
alphabets[0, 0] = "A";
This study source was downloaded by 100000862856773 from CourseHero.com on 04-14-2023 08:33:16 GMT -05:00
https://www.coursehero.com/file/116955345/VALMONTEdocx/
alphabets[0, 1] = "B";
alphabets[1, 0] = "C";
alphabets[1, 1] = "D";
alphabets[2, 0] = "E";
alphabets[2, 1] = "F";
A string with any message. Then, determine if the message contains the string, "hello".
using System;
using System.Collections;
namespace ConsoleApp7
{
class Program
{
This study source was downloaded by 100000862856773 from CourseHero.com on 04-14-2023 08:33:16 GMT -05:00
https://www.coursehero.com/file/116955345/VALMONTEdocx/
Crossfire.Add("hello");
Crossfire.Add("spop");
Crossfire.Add("sas");
Crossfire.Add("swat");
Crossfire.Add("omoh");
Crossfire.Add("sov");
Crossfire.Add("opes");
Console.WriteLine("Enter character name that exist inside of the array");
String characters = Console.ReadLine();
if (Crossfire.Contains(characters))
Console.WriteLine("The word is existed inside the array");
else
Console.WriteLine("The word does not exist inside the array");
}
}
This study source was downloaded by 100000862856773 from CourseHero.com on 04-14-2023 08:33:16 GMT -05:00
https://www.coursehero.com/file/116955345/VALMONTEdocx/
Powered by TCPDF (www.tcpdf.org)