Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

//create module, variable declaration, and input Module main Declare String phone Display Enter 10 Digit Phone Number (xxx-xxx-xxxx): Input phone //create if for changing letters

//create module, variable declaration, and input
  • Module main
  • Declare String phone
  • Display Enter 10 Digit Phone Number (xxx-xxx-xxxx):
  • Input phone
  • //create if for changing letters to numbers
  • If isLetter(phone) Then
  • change (phone)
  • Display Your numeric number is, phone
  • Else
  • Display Your phone number is already in a numeric set.
  • End If
  • End Module
  • //create module of changing the number
  • Module change (String Ref phone)
  • Declare Integer Index
  • Declare String phone
  • For index = 0 to length(phone) 1
  • If phone == A OR B OR C then
  • Set phone = 2
  • Else
  • If phone == D OR E OR F Then
  • Set phone = 3
  • Else
  • If phone == G OR H OR I Then
  • Set phone = 4
  • Else
  • If phone == J OR K OR L Then
  • Set phone = 5
  • Else
  • If phone == M OR N OR O Then
  • Set phone = 6
  • Else
  • If phone == P OR Q OR R OR S Then
  • Set phone = 7
  • Else
  • If phone == T OR U OR V Then
  • Set phone = 8
  • Else
  • If phone == W OR X OR Y OR Z Then
  • Set phone = 9
  • End If
  • End If
  • End If
  • End If
  • End If
  • End If
  • End If
  • End If
  • End For
  • End Function
  • Step by Step Solution

    There are 3 Steps involved in it

    Step: 1

    blur-text-image

    Get Instant Access to Expert-Tailored Solutions

    See step-by-step solutions with expert insights and AI powered tools for academic success

    Step: 2

    blur-text-image_2

    Step: 3

    blur-text-image_3

    Ace Your Homework with AI

    Get the answers you need in no time with our AI-driven, step-by-step assistance

    Get Started

    Recommended Textbook for

    Mobile Communications

    Authors: Jochen Schiller

    2nd edition

    978-0321123817, 321123816, 978-8131724262

    More Books

    Students also viewed these Programming questions

    Question

    Given that P (B) = .29 and P (A and B) = .24, find P (A | B).

    Answered: 1 week ago