Please help me with this question | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Please help me with this question

Int a=4 , b= 5 , c=6 , d =12 What is ++a - c / d + b

12th Apr 2017, 11:55 PM
Philip
5 Answers
+ 13
++a - c / d + b = 5 - 6 / 12 + 5 = 5 - 0 + 5 = 10
13th Apr 2017, 12:06 AM
Hatsy Rei
Hatsy Rei - avatar
+ 7
first 4+1 = 5 6 / 12 = 0 5 + 5 should be = 10 (edited)
13th Apr 2017, 12:08 AM
Manual
Manual - avatar
+ 7
Oh I messed up. Thanks Hatsy
13th Apr 2017, 12:15 AM
Manual
Manual - avatar
+ 6
Try using the playground to practice it. Also use bedmass helps for the correct order to calculate it. % comes before adding
13th Apr 2017, 12:11 AM
Manual
Manual - avatar
+ 1
i) =5-6/12+5 ii) =5-6/17 iii) -1/17
13th Apr 2017, 9:34 PM
H Fery
H Fery - avatar