hi guys, great to be back in this site after a long time. well, i am learning java and want to add two numbers using stack.
int a= 123;
int b=4567;
i want each of the values to read one by one and push to the stack. so i will have one stack to store "a" value and another to store "b" value. then i want to add the top of stack values and store it in third stack and then once the operation is over, i need to print out the result from the third stack.
please enlighten me!
int a= 123;
int b=4567;
i want each of the values to read one by one and push to the stack. so i will have one stack to store "a" value and another to store "b" value. then i want to add the top of stack values and store it in third stack and then once the operation is over, i need to print out the result from the third stack.
please enlighten me!
Comment