Sum all of the digits

andpp209

New member
Joined
Mar 31, 2020
Messages
2
Programming Experience
Beginner
Hi, I'm a beginner and I'm really sorry if this is a question that is too dumb to ask.
I wanna ask how to make a program that could sum the numbers you input and show it
Ist
1585660439870.png

Then
1585660345261.png


This is what I know so far (I just started to learn C# not long time ago)
1585660536281.png


But I know if I write the program like that, I could only sum digits (without ",") that are from 1-9. Could anybody help or give me some ideas? Thank You
 

Attachments

  • 1585660370125.png
    1585660370125.png
    3 KB · Views: 7
  • 1585660404464.png
    1585660404464.png
    2.5 KB · Views: 6
If you have a single string containing multiple numbers separated by commas then obviously the very first thing to do is to split that string on those commas. What did you find when you searched for that in a search engine?
 
If you have a single string containing multiple numbers separated by commas then obviously the very first thing to do is to split that string on those commas. What did you find when you searched for that in a search engine?
Okay now I get it, I need to use the "split" stuff, thanks. Sorry if this question is too dumb, I'll try to ask a better question next time
 
Back
Top Bottom