Search:

Type: Posts; User: ThePrince

Search: Search took 0.20 seconds.

  1. Replies
    33
    Views
    696

    Re: ASSIGNMENT HELP

    yeup, i finally got the damn thing to work. thanks for your help norm. much appreciated man.
  2. Replies
    33
    Views
    696

    Re: ASSIGNMENT HELP

    yeup! i finally got it to work, but I'm having one last problem..
    the program is supposed to keep running until 999999999 is entered

    so if i create a while loop for example:

    while...
  3. Replies
    33
    Views
    696

    Re: ASSIGNMENT HELP

    okay it works now, but how would i throw this all into a loop. i don't get how i would be able to set up a for loop and have it check if each number doubled is greater than 9 and then individually...
  4. Replies
    33
    Views
    696

    Re: ASSIGNMENT HELP

    the teacher was absent that day and we were expected to learn the lesson ourselves!:(
    so what do you think i should do? subtract it by 0 after the if (num1>9) or before?
  5. Replies
    33
    Views
    696

    Re: ASSIGNMENT HELP

    @myjava okay i'll try your code out! thanks man

    --- Update ---





    //Start the process
  6. Replies
    33
    Views
    696

    Re: ASSIGNMENT HELP

    i copy and pasted it into the compiler and got '8' =56
    so i would have to subtract '8' by 0 to get 8?
  7. Replies
    33
    Views
    696

    Re: ASSIGNMENT HELP

    woah, i checked the value of num1 and i got 112!!
    any thoughts on why? :|

    and yeah, ill do that for sure next time!
  8. Replies
    33
    Views
    696

    Re: ASSIGNMENT HELP

    okay thanks so much! but why is it that when i put down 888888888 as the SIN number, and do this


    char c1 = SIN.charAt(1);
    char c2 = SIN.charAt(3);
    char c3 = SIN.charAt(5);...
  9. Replies
    33
    Views
    696

    Re: ASSIGNMENT HELP

    // Prompt for SIN Card number as string, convert to integer to get check digit, output the check digit, convert back to string for proccess

    System.out.println("Please enter your SIN card number:...
  10. Replies
    33
    Views
    696

    Re: ASSIGNMENT HELP

    char c1 = SIN.charAt(1);
    char c2 = SIN.charAt(3);
    char c3 = SIN.charAt(5);
    char c4 = SIN.charAt(7);
    int num1 = c1*2;
    if (num1>9){
    Integer.toString(num1);
    char num1_1 =...
  11. Replies
    33
    Views
    696

    Re: ASSIGNMENT HELP

    i'm a java noob... could you get my program started? like just until the loop cause i tried to put it as a string but i don't know how i would get the 2nd, 4th, 6th, 8th digits out of it! im...
  12. Replies
    33
    Views
    696

    Re: ASSIGNMENT HELP

    what do you suggest would be the best way to do it
  13. Replies
    33
    Views
    696

    Re: ASSIGNMENT HELP

    i don't know how to convert it to from a int to a string then back ...
  14. Replies
    33
    Views
    696

    Re: ASSIGNMENT HELP

    yeah you can do that! my teacher said you're allowed to do anything as long as it's in a loop but i dont know how to do it.. like i know the syntax but don't know how to apply it here.
  15. Replies
    33
    Views
    696

    Re: ASSIGNMENT HELP

    i don't know how to get each digit on it's own... i tried %10 to get the last digit but i don't understand how i would throw this all into a for loop!
  16. Replies
    33
    Views
    696

    ASSIGNMENT HELP

    i tried at least 50 times for this code to work and i just can't get it to work. can someone tell me how to do it?


    Assignment - Repetition

    In the nine-digit Social Insurance Number given to...
Results 1 to 16 of 16