3

# Calculator

what on this code is wrong? https://code.sololearn.com/cAeQsgL9ClBI/?ref=app

4th Feb 2020, 12:12 PM
Nicola
43 Answers
+ 2
Nicola Esu It works. try to change depending on needed one, by observing output what & how happening... printf("%d\n", tot); write this outside loop for final output only... 2+3-5+7-4= 3 output
4th Feb 2020, 8:30 PM
JayakrishnaðŸ‡®ðŸ‡³
+ 6
I wrote my calculator in html + css + javascript
5th Feb 2020, 4:39 PM
Lubov Kad
+ 2
my intent was to create a calculator that in a loop kept asking for numbers and symbols and when inserting the symbol = did all the operations. in this way it only does the operation between two numbers.
4th Feb 2020, 3:20 PM
Nicola
+ 2
i have to initialize num2 to ?
4th Feb 2020, 6:54 PM
Nicola
+ 1
you think the array is not needed?
4th Feb 2020, 12:17 PM
Nicola
+ 1
donâ€™t work!
4th Feb 2020, 12:55 PM
Nicola
+ 1
donâ€™t work ! i have modifing the code!
4th Feb 2020, 2:59 PM
Nicola
+ 1
yes but only if I do for example num1 -or+ num2! if i want to make 10 - 5 + 3 + 2= donâ€™t work!
4th Feb 2020, 3:35 PM
Nicola
+ 1
Jayakrishna i have changed the while condition but donâ€™t work.
4th Feb 2020, 4:03 PM
Nicola
+ 1
if i want to make more operations at the same time i have to use the array for numbers to ?
4th Feb 2020, 4:11 PM
Nicola
+ 1
if a user of my calculator would like to do a long calculation, for example 10 + 5 - 2 + 7 = how should i write?
4th Feb 2020, 6:30 PM
Nicola
+ 1
more scanf for numbers ? and more if condictions ?
4th Feb 2020, 6:36 PM
Nicola
+ 1
look now!
4th Feb 2020, 7:56 PM
Nicola
+ 1
How to install packages in python
4th Feb 2020, 8:02 PM
Amisha Jha
+ 1
donâ€™t work!
4th Feb 2020, 8:18 PM
Nicola
+ 1
yes is work! thank you !
5th Feb 2020, 8:11 AM
Nicola
+ 1
why if i try on xcode the loop donâ€™t end and donâ€™t print the total ?
5th Feb 2020, 10:24 AM
Nicola
+ 1
No need to use array .
5th Feb 2020, 11:54 AM
Gopal Agarwal
+ 1
the code is the same but for end the loop I have to insert the first = and then the second = otherwise it does not end
5th Feb 2020, 1:51 PM
Nicola
5th Feb 2020, 4:37 PM
Ak Singh