How to write algo in c#?
I have input 123456..
I want to output in
1
12
123
1234
12345
123456
pls quecky gime my solotion..
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Ajay GohilRank #2,370 · 599 reputationPosted Jun 10, 2020, 10:33 PM EDT
Mike GoldRank #50 · 30.6K reputationPosted Aug 16, 2010, 7:03 PM EDT
-Mike
Sam HobbsRank #107 · 20.5K reputationPosted Aug 16, 2010, 8:09 PM EDT
There are two general solutions; either mathematical or textual. You could use an algorithm that mathematically calculates each number, such as Mike is suggesting. An alternative is to use a textual solution int e sense of concatenating digits as text. Do you understand? Which do you want to do?
Chris Riley33 reputationPosted Sep 2, 2010, 1:24 PM EDT
Sam HobbsRank #107 · 20.5K reputationPosted Sep 2, 2010, 1:50 PM EDT
Chris Riley33 reputationPosted Sep 10, 2010, 11:46 AM EDT