Round up and round Down without ceil and floor? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Round up and round Down without ceil and floor?

Some solutions without import math? https://code.sololearn.com/cheV1liq5384/?ref=app

31st Mar 2021, 2:47 PM
Илья Мирошник
Илья Мирошник - avatar
2 Answers
+ 3
Looks like a solution, so what is your question? It has one flaw though: it doesn't work if the number has less decimal places than specified by grade.
31st Mar 2021, 3:09 PM
Benjamin Jürgens
Benjamin Jürgens - avatar
0
Interesting another solutions not based on text parsing
31st Mar 2021, 3:16 PM
Илья Мирошник
Илья Мирошник - avatar