
-----------------------------------
Williamarf
Fri Oct 19, 2012 4:10 pm

What type of loop should I use
-----------------------------------
I made this program for an assignment and its finnished, but I want to add a loop so I don't have to rerun my programe for each char. What type would be best?

Thanks for any assistance you can provide.  :canada: 



/***********************************************************
* Name: William Frisk              Date: October 11, 2012  *
*                                                          *
* Description: This simple program will determain weather  *
*              the user has typed in a digit or a letter,  *
*              if its a letter it will detect whether it   *
*              is uppercase, lowercase, or a consonant.    *
***********************************************************/

   import java.util.Scanner; //importing the scanner

   class Letter_Diget
   {
      public static void main (String

-----------------------------------
whoareyou
Fri Oct 19, 2012 6:10 pm

RE:What type of loop should I use
-----------------------------------
I think a do-while loop would be appropriate.

-----------------------------------
QuantumPhysics
Sat Oct 20, 2012 2:03 am

Re: What type of loop should I use
-----------------------------------
Or you can have a for loop and have the user input the amount of times to run the program


//scanner....

runTimes = scannerName.nextInt();
for(int i=0;i