the answer of 14.5%19 is 14.5 but in php the answer won't be a float and it shows 14 instead. Can I do sth to have 14.5? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

the answer of 14.5%19 is 14.5 but in php the answer won't be a float and it shows 14 instead. Can I do sth to have 14.5?

https://code.sololearn.com/wpDZ4J95PfgY/?ref=app

17th Jul 2019, 7:48 PM
Amirhesam Sadegh
Amirhesam Sadegh - avatar
2 Answers
+ 2
You can use fmod() method. Please look at the code. Hope it helps you 😉 https://code.sololearn.com/wPzx83q25y3O/?ref=app
17th Jul 2019, 8:03 PM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar
0
It works, thanks for your help😊
18th Jul 2019, 6:36 AM
Amirhesam Sadegh
Amirhesam Sadegh - avatar