Does anyone know a way to remove the 0's from an integer? i.e 1320000 would be 132 and 540 would just be 54.
schroaus
8
Junior Poster in Training
Recommended Answers
Jump to PostI would use the modulo operator (%) and division for this. Modulo gives you the remainder of integer division so
100 % 10 = 0
. So if100 % 10 = 0
then you need to get rid of the rightmost 0 by division. Divsion by 10 will do that. …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.