using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace revarse_sentence
{
class Program
{
static void Main(string[] args)
{
string str = Console.ReadLine();
string strrev = "";
foreach (var word in str.Split(' ') )
{
string temp = "";
foreach (var ch in word.ToCharArray())
{
temp = ch + temp;
}
strrev = strrev + temp + " ";
}
Console.WriteLine(strrev);
Console.ReadLine();
}
}
}
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace revarse_sentence
{
class Program
{
static void Main(string[] args)
{
string str = Console.ReadLine();
string strrev = "";
foreach (var word in str.Split(' ') )
{
string temp = "";
foreach (var ch in word.ToCharArray())
{
temp = ch + temp;
}
strrev = strrev + temp + " ";
}
Console.WriteLine(strrev);
Console.ReadLine();
}
}
}
No comments:
Post a Comment