0
arithmetic operator Java
Can anybody help me, I have and assignment from my teacher How to code x = 7*6+5/3 with the same order, and the output must be 19?
6 Réponses
+ 2
You have started to study the Java tutorial.
Have you tried to solve it?
Please show us your attempt!
+ 2
HonFu Thank you so much for the answer!
i have tried it.
1st attempt :
I wrote x = 7*6+5/3, the output is 43
2nd attempt :
x = 7*(6+5)/3, the output is 25
3rd attempt :
x = 7*(6+5/3), the output is 49
4th attempt :
x = (7*6+5)/3, the output is 15
5th attempt :
x = 7*((6+5)/3), the output is 21
+ 2
Ome Are your teacher sure about question is correct?
Is there missing anything?
+ 2
Ome
I think, If it 15 not 5, among all possible cases.. Then,
(7*6+15)/3=19
Rest all you already tried..
And
you're welcome..
+ 1
Jayakrishna Thank you for the answer! I don't know. Tbh, i kind of doubting her. I will ask her again then.
+ 1
Jayakrishna Thank you so much for the answer!