Docsity

C# Program to Find Index of Letters in the Alphabet Array, Exercises of Javascript programming

Toggle sidebar
bg1
...urce\repos\BSIT3-2\ArrayPt.3_B\ArrayPt.3_B\Program.cs 1
//Rivas, Joy B.
//BSIT 3-2
//Write a program that creates an array containing all letters from the
alphabet (A-Z).
//Read a word from the console and print the index of each of its letters in
the array.
string[] index = new string [26];
string alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
char[] array = alphabet.ToCharArray();
for (int i = 0; i < array.Length; i++)
{
char letter = array[i];
}
//Console.WriteLine(alphabet);
Console.WriteLine(alphabet.IndexOf("J"));

Partial preview of the text

Download C# Program to Find Index of Letters in the Alphabet Array and more Exercises Javascript programming in PDF only on Docsity!

...urce\repos\BSIT3-2\ArrayPt.3_B\ArrayPt.3_B\Program.cs 1 //Rivas, Joy B. //BSIT 3- 2 //Write a program that creates an array containing all letters from the alphabet (A-Z). //Read a word from the console and print the index of each of its letters in the array. string[] index = new string [26]; string alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; char[] array = alphabet.ToCharArray(); for (int i = 0; i < array.Length; i++) { char letter = array[i]; } //Console.WriteLine(alphabet); Console.WriteLine(alphabet.IndexOf("J"));