Software Engineering Chapter Two after-school exercise 2.5

Source: Internet
Author: User

There are several types of telephone numbers available in a university in Beijing: the number on the campus is 4 digits, the 1th digit is not 0; the outside telephone is divided into the city telephone and the field telephone two class, pulls off-campus telephone to first unplug 0, if the city telephone then then pulls out 8 digits (first not 0), If the field calls, unplug the 3-digit area code and then unplug the 8-digit number (the first digit is not 0).

Define the above telephone number using the method of defining the data in the 2.5.2 section.

  For:

  Phone number =[on-Campus Phone number |

On-campus Phone number = not 0 digits + 3 digits//after continuing to define

Outside phone number =[City number | field number]

City Number = number 0 + 8 digits

Field number = number 0 + 3 digits + 8 digits

Non-0 Digital =[1|2|3|4|5|6|7|8| 9]

Number 0 = 0

3-digit =3{digital}3//3 to 3 digits

8 digits = Non-0 digits + 7 digits

7-bit digital =7{digital}7

Digital =[0|1|2|3|4|5|6|7|8| 9]

Software Engineering Chapter Two after-school exercise 2.5

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.