Run Code
|
API
|
Code Wall
|
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
u
EqualityComparer
Sort A List : Print the sorted list of ages of the students
ex8 For_Loop
sdfgtrewqdsc sdzdxsd
array int
1234
Fórum ➡ Building a List<> with questions and answers, from data in TXT file, using LINQ ♦
Tarkov Time
Operator operates. Op!