+ 2
How to code in C#?
First get a sentence ( like- " My name is Sharif") then arrange the sentence like following- My name is Sharif name is Sharif My is Sharif My name Sharif My name is
5 Answers
+ 6
Xan: Nice! Your approach with nested for loops should yield the best performance.
Sharif: I ended up putting together a variety of ways you can accomplish the same results. I figure it's good to see what options are available in C#.
Using for loop with lambda ForEach:
https://code.sololearn.com/c90R489e4SXN/#cs
Using do while Loop:
https://code.sololearn.com/c6l95X22Wbst/#cs
Using Recursion:
https://code.sololearn.com/c4vLMjgdfWay/#cs
Using Enumerable Range:
https://code.sololearn.com/cOI6PTyxA8Aa/#cs
+ 3
Sharif David Carroll Happy coding both âșâșâș
+ 2
Here's some code I knocked up for you:
https://code.sololearn.com/cCLfh8G6S1lj/?ref=app
+ 2
Xan and David Carroll,
Thanks for your valuable efforts. I have found exactly what I wanted.
+ 2
David Carroll Great to show variations âș