Q:2 Write a program in C# that take string input, and print is number of characters???
Ans:- using System;
using System.Collections.Generic;
using System.Text;
namespace codeforevenorodd
{
class Program
{
static void Main(string[] args)
{
string name;
Console.WriteLine("Enter any Name ");
name = Console.ReadLine();
Console.WriteLine(name.Length);
Console.ReadLine();
}
}
}
No comments:
Post a Comment