using System;
class HelloCSharp
{
static void Main()
{
Console.WriteLine("Hello C#");
}
}
I want the output to be:
H
e
l
l
o
C
#
but every letter should start on a new line
I am new I know but I keep searching and can't find the answer. Should it be something with Environment.NewLine
?
Here you go:
string str = "Hello C#"
char[] arr = str.ToCharArray();
foreach (char c in arr)
{
Console.WriteLine(c);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With