Design and implement a c program

Assignment Help Business Management
Reference no: EM132271598

Design and implement a C program which repeatedly asks for a telephone number and validates it

The program exits when the user enters a negative integer for the telephone number. You can assume that the user always enters an integer for a telephone number.

Valid telephone numbers have 11 or 10 digits and follow the format.

FormatTrunk Code - Area Code or Mobile Code - Phone Number

           1      +      3    or    2        +     7          =    11 or 10 digits  

  • Trunk Code: 0
  • Area Code: 200-299 (from 200 to 299 inclusive) which has 3 digits
  • Mobile Code: 32-39, 52, 56, 58, 59, 70, 76-79, 81-99 which has 2 digits
  • Phone Number: 7 digits

If the entered telephone number is valid, print out a message saying that it's valid. In the case it's not valid, print out a message saying that it's invalid and describes the error in details. Here is the list of errors:

  • More than 11 digits
  • Less than 10 digits
  • Invalid trunk code
  • Invalid area code
  • Invalid mobile code

Reference no: EM132271598

Questions Cloud

Issue of scalability in ospf multi-access network : How was DR and BDR were able to solve the issue of scalability in OSPF multi-access network.
What is the definition of value chain : In two detailed paragraphs please explain What is a customer benefit package and What is the definition of a value chain?
Program that reads a local election result file : C++ program that reads a local election result file (called "votes.txt"):
Analyze how they played a part in the problem : Write two or three alternative solutions to the problem, and evaluate the advantages and disadvantages of each.
Design and implement a c program : Design and implement a C program which repeatedly asks for a telephone number and validates it
What are the potential business impacts in emergency room : X Axis is a renowned private cancer hospital located in Las Vegas. The hospital maintains a critical database that includes patient data for all patients.
Analyze strategy to enhance international supply chain : Break down and analyze the July 2007 report issued by the Dept. of Homeland Security: 'Strategy to Enhance International Supply Chain Security'.
Difference between the count aggregate function : What is the difference between the COUNT aggregate function and the SUM aggregate function?
Increase profits by either lowering the cost of production : Firms can increase profits by either lowering the cost of production or increasing the value of their product (and charging a higher price).

Reviews

Write a Review

Business Management Questions & Answers

  Aftermath of the penn state university

The purpose of the meeting is to discuss, in the aftermath of the Penn State University child abuse sex scandal, how your firm would approach conducting an ethical culture audit at West Chester university.

  Ownership offer protections from creditors

By acquire a property as tenants by the entirety rather than by joint tenancy. Would this type of ownership offer protections from creditors?

  Global organization with a multinational presence

Identify a global organization with a multinational presence. Identify and research a cultural issue that affects this organization's interactions outside the United States.

  Performance management procedures

Discuss how each of these motivation theories can be used in the performance management procedures.

  Organizational structure of mcdonald

How should Easterbrook adapt the organizational structure of McDonald's to achieve his strategic plan?

  Basic forms of business ownership in the united statesmeet

basic forms of business ownership in the united statesmeet with other department members using the discussion board.

  Whistle regarding ethical behavior at work

What Whistle Blowing process would an employee follow if they decided to blow the whistle regarding ethical behavior at work?

  Purpose of trade sales promotions

What is the purpose of trade sales promotions? Identify three types of trade sales promotions that Frito-Lay should use to increase sales. Specifically how should these be implemented?

  Understanding of basic accounting concepts

Understanding of basic accounting concepts. Business Transaction?

  Assume andre revises the compensation method

Assume Andre revises the compensation method. The barbers will receive $4 per hour plus $6 for each haircut.

  Explain the nature of stress at work

Explain the nature of stress at work? Describe the health consequences of stressful work?

  Describe coaching

Describe coaching and discuss its relationship with the term mentoring. Use examples from your own experience if possible.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd