Results 1 to 3 of 3
- 04-18-2011, 01:20 PM #1
Member
- Join Date
- Apr 2011
- Posts
- 5
- Rep Power
- 0
How to print three digits in an increase.
Hi! this is my first post as i'm starting the programming career. First of all, English is not my first language so i'm not really familiar with the tech terms yet...
I've come to my first assignment and i'm doing really good, but i cant get to print three digits.
I'm trying to generate different combinations for car license plates (I'm not sure if that's what you call them). Car plates in Argentina are a combination of three digits and three letters. I've been able to print the different letter combinations but i'm having a hard time printing the three digit numbers.
for(patenteNumeros = 000; patenteNumeros <= 999; patenteNumeros++){
I need to increase from 000 to 999, but i cant get to print the whole "000" it just only prints "0" and adds a second digit when gets to 10 and a third one at 100 up to 999.
Does anyone know how to get to print the three digits on the console?
sorry if i didn't make it really clear.
Thank you!!
- 04-18-2011, 01:50 PM #2
Recommended reading: DecimalFormat (Java Platform SE 6)
How to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
- 04-18-2011, 02:26 PM #3
Member
- Join Date
- Apr 2011
- Posts
- 5
- Rep Power
- 0
Similar Threads
-
increase array size
By giorgi in forum New To JavaReplies: 45Last Post: 04-08-2011, 04:56 PM -
Value should be 7 or 8 digits .If 8 digits, the last should be a character
By renu in forum New To JavaReplies: 1Last Post: 01-19-2011, 09:23 PM -
How to increase whitespace?
By Cylab in forum New To JavaReplies: 4Last Post: 08-09-2010, 08:00 PM -
why the number will not increase?
By rayda in forum New To JavaReplies: 3Last Post: 03-16-2009, 05:47 AM -
Increase signature length?
By xcallmejudasx in forum Suggestions & FeedbackReplies: 3Last Post: 12-18-2008, 06:04 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks