1.25%0.5=0.25 How we got this answer? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

1.25%0.5=0.25 How we got this answer?

24th Feb 2019, 10:09 AM
Rufaida Hilal Al Suleimani
Rufaida Hilal Al Suleimani - avatar
4 Answers
+ 1
The % operator means the *remainder* after the division is executed. In your example 1.25%0.5 means the remainder after 1.25 is divided by 0.5. It is easy to see that 0.5 goes *fully* into 1.25 two times, which makes 1. The remainder is 0.25.
24th Feb 2019, 11:07 AM
Russ
Russ - avatar
+ 1
7%3 would be 1 because 3 goes into 7 twice (making 6) and the remainder is 1.
24th Feb 2019, 12:00 PM
Russ
Russ - avatar
0
0.5 × 3 = 1.5 0.5 × 2 = 1 1 + ? = 1.25 ? = 1.25 -1 = 0.25
24th Feb 2019, 10:43 AM
gil gil
0
well I understanded please give me another example if you have. Thank you for your response.
24th Feb 2019, 11:53 AM
Rufaida Hilal Al Suleimani
Rufaida Hilal Al Suleimani - avatar