Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

C Program that translates a alpha phone Num to numberic

smm032smm032 Member Posts: 4
ex: 2=ABC, 3=DEF, 4=GHI, 5=JKL, 6=MNO, 7=PRS, 8=TUV, 9=WXY

Not understanding how to define and separate the numbers if they are bunched together. The letters and numbers represent phone numbers. Need find a way to code lets say exam: 1800-COL-LECT TO 1800-265-5328.

Comments

  • tom_swtom_sw Member Posts: 828
    : ex: 2=ABC, 3=DEF, 4=GHI, 5=JKL, 6=MNO, 7=PRS, 8=TUV, 9=WXY
    :
    : Not understanding how to define and separate the numbers if they are bunched together. The letters and numbers represent phone numbers. Need find a way to code lets say exam: 1800-COL-LECT TO 1800-265-5328.
    :
    :
    [code]Enter string for alpha phone number (alphaNum)

    for x = 0 to strlen(alphaNum)
    if alphaNum[x] is a letter
    get digit value of the letter
    copy digit to targetNum string
    loop x

    display targetNum[/code]

Sign In or Register to comment.