Tuesday, September 27, 2022

Display Array of Strings in C#

 A simple program to display array of string using C# programming language.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg

=================================================


Want to support my channel?

GCash Account

Jake Pomperada


09173084360


Paypal

https://paypal.me/jakerpomperada


Patreon

https://www.patreon.com/jakerpomperada


Thank you very much for your support.

 



 Program Listing


using System;


/* string.cs
Author : Jake Rodriguez Pomperada, MAED-IT, MIT
Tools : C#
Date : September 27, 2022 Tuesday 6:44 PM
Website : www.jakerpomperada.com and www.jakerpomperada.blogspot.com
Email : jakerpomperada@gmail.com
*/

public class average
{
public static void Main()
{
int[] arr = new int[5];
Console.Write("\n\n");
Console.Write("\t---------------------------------------------------------");
Console.Write("\n\t\t\tDisplay Array of Strings in C#\n");
Console.Write("\t---------------------------------------------------------\n\n");
string[] subjects = new string[5];
subjects[0] = "English";
subjects[1] = "Math";
subjects[2] = "Filipino";
subjects[3] = "Science";
subjects[4] = "Physical Education";
for (int i = 0; i < arr.Length; i++)
{
string element = subjects[i];
Console.Write("\t{0}\n ",element);
}

Console.Write("\n");
Console.Write("\tEnd of Program");
Console.Write("\n");
}
}


 

No comments:

Post a Comment