mashin hesab

من می‌خواهم یک ماشین حساب ساده بنویسم که بتواند حتی دو عدد صد رقمی را هم جمع کند و الآن فقط نوشتن جمع با دو عدد
int_64
و کوچکتر را بلدم. در ضمن محیط مورد استفاده‌ی من
microsoft visual studio 2010
Sorry, but I'd say most of us can't read that.

EDIT:

Google translate gets something along the lines of...

You want to write a calculator that can calculate numbers up to 200 digits? You'll probably need to use a library for that.
Last edited on
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.
Guys try translating your answers, it might help
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.
Topic archived. No new replies allowed.