I can not figure out how to set the first, second, and third to equal correctly.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • PLustin

    #1

    I can not figure out how to set the first, second, and third to equal correctly.

    I have to write a application that creates and prints a random phone number of the form xxx-xxx-xxxx. Include the dashes in the output. Do not let the first three digits to contain an 8 or 9, and also the first digit cannot be 0(area code can’t start with a 0).The second set of three digits is not greater than 742(do not determine individually). The last four digits will be from 0 to 9999. Each digit does NOT have to be determined separately.
  • jkmyoung
    Recognized Expert Top Contributor
    • Mar 2006
    • 2057

    #2
    Alright, what problem are you having with your current program? What do you mean by first second and third? Do you mean sets of digits or each digit?

    Are you determining each digit seperately, or are you trying to group digits?

    Comment

    Working...