Q:- Write a program in C# that take string input and print the result vertically???
Ans:- using System;
using System.Collections.Generic;
using System.Text;
namespace codeforevenorodd
{
class Program
{
static void Main(string[] args)
{
string name = Console.ReadLine();
for (int i = 0; i < name.Length; i++)
{
Console.WriteLine(name[i]);
}
Console.ReadLine();
}
}
}
Ans:- using System;
using System.Collections.Generic;
using System.Text;
namespace codeforevenorodd
{
class Program
{
static void Main(string[] args)
{
string name = Console.ReadLine();
for (int i = 0; i < name.Length; i++)
{
Console.WriteLine(name[i]);
}
Console.ReadLine();
}
}
}
ravi kumar
ReplyDelete