من میخواهم یک ماشین حساب ساده بنویسم که بتواند حتی دو عدد صد رقمی را هم جمع کند و الآن فقط نوشتن جمع با دو عدد
int_64
و کوچکتر را بلدم. در ضمن محیط مورد استفادهی من
microsoft visual studio 2010
I made a program like that once in C++. You can accomplish this by using a stack. I created my own stack class using vectors. Then it's just a matter of reading in the numbers as strings, and pushing each digit onto the stack with a for loop.
1 2 3
for (int i = 0; i < this->firstNum.length(); i++) {
this->s1.push(this->firstNum.at(i));
}
and finally calculate each digit individually by popping it off the stack and adding/subtracting/whatever to it.
I doubt it'll help THAT much. Going from Persian (according to google) to english was pretty rough. I'm sure going back again would be pretty bad as well.