Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to print a second rightmost digit of integral part of a float?
Posted
Comments
Andreas Gieriet 17-Oct-15 6:26am    
Do you have some example?
What is the purpose - sounds a very odd requirement...
Homework assignment?
Regards
Andi

1 solution

Assign to an int, divide by 10 followed by modulo 10. Then print the resulting number.
You might face rounding issues, though.
Regards
Andi
 
Share this answer
 
Comments
phil.o 17-Oct-15 6:45am    
Bright! 5'd
Andreas Gieriet 17-Oct-15 7:15am    
Thanks for your 5!
Cheers
Andi

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900