We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hey i wants to get idea for how to subtact two arrays of ascii chracters of amount....
e.g.
unsigned char ary1[3],ary2[3],ary[3];
ary1[1]=0x32; //0x32 is ascii code for 2 ary1[2]=0x31; //same 0x31 is ascii code of 1 ary1[3]=0x34;
ary2[1]=0x35; ary2[2]=0x32; ary2[3]=0x35;
Please give me idea..... I am facing problem for carry forwarding....
Addendum: you normally borrow for subtraction. But same principle. How do you do it with pen and paper.
And it's easier if you work with the digits in binary form 0..9 instead of ASCII form. But if you just remember the offset between binary form and ASCII form (you have two offsets - one for each digit) it still isn't that hard.