program:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
static class strevrse
{
public static string stringreverse(string s)
{
char[] arr = s.ToCharArray();
Array.Reverse(arr);
return new string(arr);
}
}
class stringreverse
{
static void Main(string[] args)
{
Console.WriteLine(strevrse.stringreverse("HELLO WORLD"));
Console.WriteLine(strevrse.stringreverse("LOKESH"));
Console.WriteLine(strevrse.stringreverse("GURAVAIAH"));
Console.ReadLine();
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
static class strevrse
{
public static string stringreverse(string s)
{
char[] arr = s.ToCharArray();
Array.Reverse(arr);
return new string(arr);
}
}
class stringreverse
{
static void Main(string[] args)
{
Console.WriteLine(strevrse.stringreverse("HELLO WORLD"));
Console.WriteLine(strevrse.stringreverse("LOKESH"));
Console.WriteLine(strevrse.stringreverse("GURAVAIAH"));
Console.ReadLine();
}
}
}
output:
No comments:
Post a Comment