yes it is a homework. Its program that accepts two numbers of 256 digits each and after accepting two numbers it adds those two. Is there another way of doing it?
Thanks
arpita
Main Topics
Browse All TopicsHi,
I am beginner to C#. Can someone show me an example where program is accepting two numbers upto 256 digits using char arrays and then adding those two numbers using C#.
I would really appreciate help on this.
Arpita
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
OK, basically don't think of it as character arrays. Use two strings to read in the values. Then you have to remember your old grade school addition:
345678
+24601
---------
370279
Just start from the end of each string and add the two numbers together (you can convert the characters to numbers in a number of ways, my favorite is (byte)NextCharacter - 48) Don't forget to handle the case where you have to carry a one over to the next column. Build your result string as you go.
Was that vague enough to pass EE guidelines yet specific enough to help?
Business Accounts
Answer for Membership
by: Razzie_Posted on 2004-10-12 at 11:43:38ID: 12290443
Sounds like homework. Why do you want it done that way?