1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

I am new to java and need help with a Java program that disects a phone number.

Discussion in 'Java' started by dwlr00, Apr 18, 2010.

  1. dwlr00

    dwlr00 New Member

    Joined:
    Apr 18, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    I need help with a java program that disects a phone number and looks like this when it prints out.

    Code:
    PHONE NUMBER DISSECTOR     
    Enter a phone number in the form cc-area-local,
    where cc = country code digits, area = area code digits,
    and local = local phone digits.
    Or enter q to quit:
    1-816-7412000 begin_of_the_skype_highlighting              1-816-7412000      end_of_the_skype_highlighting
    country code = 1
    area code = 816
    local phone number = 7412000
    Enter a phone number in the form cc-area-local,
    where cc = country code digits, area = area code digits,
    and local = local phone digits.
    Or enter q to quit:
    86-131-12345678
    country code = 86
    area code = 131
    local phone number = 12345678
    Enter a phone number in the form cc-area-local,
    where cc = country code digits, area = area code digits,
    and local = local phone digits.
    Or enter q to quit:
    Q
    Press any key to continue . . .
    Any help would be greatly appreciated.
     
    Last edited by a moderator: Apr 19, 2010

Share This Page