I have a Distance Structure that includes Miles, Feet, and Inches. The user inputs these amounts 3 digits for miles, 4 digits for feet and 2 digits for inches. Not all of the time the user will input the full number of digits, when the user doesn't input the full number of digits I need to back fill the numbers with zero's for display. Like 97 for miles I would display is 097. The zero would be added to the user input by a call to the Print_zero function. I need some ideas on how to incorporate the back fill zero into a function. Thanks.
dallin
0
Newbie Poster
Recommended Answers
Jump to Postpsuedo code:
if miles <100 print 0 and miles if feet < 1000 print 0 and feet if inches < 10 print 0 and inches
All 4 Replies
prog-bman
4
Junior Poster
vegaseat
1,735
DaniWeb's Hypocrite
Team Colleague
vegaseat
1,735
DaniWeb's Hypocrite
Team Colleague
Dave Sinkula
2,398
long time no c
Team Colleague
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.