Search:

Type: Posts; User: Scorks

Search: Search took 0.08 seconds.

  1. Replies
    8
    Views
    1,351

    Re: Referring to specific numbers in an integer?

    Ah, nope - sorry.
  2. Replies
    8
    Views
    1,351

    Re: Referring to specific numbers in an integer?

    Ah, okay. I fixed it a little, and it compiles. When I type in "12345678" as an example, I get 212 as my answer, which isn't correct.

    My new code looks like this:


    import java.util.Scanner;...
  3. Replies
    8
    Views
    1,351

    Re: Referring to specific numbers in an integer?

    import java.util.Scanner;
    public class creditcard
    {
    public static void main ( String args[] )
    {

    System.out.println("Please enter your 8-digit credit card number");

    Scanner keyboard =...
  4. Replies
    8
    Views
    1,351

    Re: Referring to specific numbers in an integer?

    Well, I have it set as an integer. If I change it to a string, how would I go about doing that?
  5. Replies
    8
    Views
    1,351

    Referring to specific numbers in an integer?

    Hey! So, I'm working on a credit card validation program, and I was wondering how I can add up specific numbers in an integer. Like for example, if the user inputs 83139638, then I need to add up...
Results 1 to 5 of 5