+ 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

17th Apr 2018, 1:15 AM
Sharif
Sharif - avatar
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
17th Apr 2018, 6:03 AM
David Carroll
David Carroll - avatar
+ 3
Sharif David Carroll Happy coding both â˜șâ˜șâ˜ș
17th Apr 2018, 12:57 PM
Emma
+ 2
Here's some code I knocked up for you: https://code.sololearn.com/cCLfh8G6S1lj/?ref=app
17th Apr 2018, 3:32 AM
Emma
+ 2
Xan and David Carroll, Thanks for your valuable efforts. I have found exactly what I wanted.
17th Apr 2018, 8:16 AM
Sharif
Sharif - avatar
+ 2
David Carroll Great to show variations â˜ș
17th Apr 2018, 12:58 PM
Emma