Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
eze
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { // разберись как работает str.substring public static string ReplaceLetters(string str) { int len = str.Length; return str[len-1] + str.Substring(1, len-2) + str[0]; // вот главная строка за которую могут спросить } public static void Main(string[] args) { string inputText = "Hello, world"; string[] splittedText = inputText.Split(' '); List<string> resultList = new List<string>() {}; foreach(string str in splittedText) { resultList.Add(ReplaceLetters(str.Trim(','))); } string formattedText = String.Join(", ", resultList.ToArray()); Console.WriteLine("Input text: {0}", inputText); Console.WriteLine("Output text: {0}", formattedText); } } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Task 1_3
Collatz Conjecture
Story
Game_snake
Kare Çizimi
WhereEnumerator
Math 10.81 added quad seq
Count vowels in a string
Dependency Injection
No repeat test
Please log in to post a comment.