Results 1 to 3 of 3
  1. #1
    AlfieSDK is offline Member
    Join Date
    Apr 2011
    Rep Power

    Default 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!!

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Washington, DC
    Rep Power


    Recommended reading: DecimalFormat (Java Platform SE 6)
    How to Ask Questions the Smart Way
    Static Void Games - GameDev tutorials, free Java and JavaScript hosting!
    Static Void Games forum - Come say hello!

  3. #3
    AlfieSDK is offline Member
    Join Date
    Apr 2011
    Rep Power


    Thank you!
    I'm still trying to figure out...but i'll read it and let you know!

Similar Threads

  1. increase array size
    By giorgi in forum New To Java
    Replies: 45
    Last Post: 04-08-2011, 05:56 PM
  2. Replies: 1
    Last Post: 01-19-2011, 10:23 PM
  3. How to increase whitespace?
    By Cylab in forum New To Java
    Replies: 4
    Last Post: 08-09-2010, 09:00 PM
  4. why the number will not increase?
    By rayda in forum New To Java
    Replies: 3
    Last Post: 03-16-2009, 06:47 AM
  5. Increase signature length?
    By xcallmejudasx in forum Suggestions & Feedback
    Replies: 3
    Last Post: 12-18-2008, 07:04 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts