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

  Face entry by new competitors

"How a firm behaves toward existing competitors is a major determinant of whether it will face entry by new competitors." Explain.

  Explain the organizational and societal functions of pr you

explain the organizational and societal functions of pr. you must use at least one credible external source e.g.

  Simple organizational chart for a facility

As a new health care manager, you will need to have an organizational chart of the facility and of your department. Complete the following for this assignment:

  Determining the standard deviation of the flow

The probability of a river flow exceeding 2,000 cubic meters per second is 15% and the coefficient of variation of these flows is 20%. Assuming a normal distribution calculate

  Shows that the corporation could return

The data shows that the corporation could return to profitability by disposing of its jets and replacing them with turboprops.

  Improve communication with the nurse leader

What actions can the staff nurse take to improve communication with the nurse leader?

  Importance of alignment of individual

This unit introduces you to the importance of alignment of individual, job, and organizational needs analyses. While many organizations have created and delivered exciting training programs, unless the programs are aligned to the organizations' st..

  Ethics and social responsibility into paper

Based on your research, suggest three specific ways our economy would be different today if the Motor Carrier Act had never occurred. Incorporate material specific to ethics and social responsibility into your paper.

  Standout competitive characteristic of a fragmented industry

Find the standout competitive characteristic or feature of a fragmented industry.

  Dollar amount of interest was earned

A 90-day bank bill with a face value $500,000 with 4.00% yield. If it is sold after 30 days at a yield of 4.50%, what dollar amount of interest was earned?

  The three main challenges small businesses face

What are the three main challenges small businesses face when they go global?- What strategies can a small company use to deal with each of these challenges?

  Importance of swot in company strategy development

Discuss the role of industry's driving forces on company strategy and the importance of SWOT in company strategy development.

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