2
How could I print the fifth (index 4 from the dot) part of a real number without using libraries or a "complex" code for initial chapters.
- Make a program that reads a real number, and print the fifth part of that number.
2
How could I print the fifth (index 4 from the dot) part of a real number without using libraries or a "complex" code for initial chapters.
3
-2
In Python it would be like this:
n = float(input('Digite um número: '))
q = n * (1/5)
print('A quinta parte de {:.2f} é {:.2f}'.format(n, q))
Thanks for the opportunity.
Please add more details to expand your response, such as a working code or documentation quotes.
The question refers c
and not python
Browser other questions tagged c float scanf printf
You are not signed in. Login or sign up in order to post.
The fifth part would not be 1/5 of the number?
– Caique Romero
I believe it’s the 5 element, these are the only information passed
– user71383