Determine the minimum and maximum parameters

Assignment Help C/C++ Programming
Reference no: EM133201531

int GetValidatedInt(const char* strMessage, int nMinimumRange = 0, int nMaximumRange = 0);

This function should first display the provided message to the screen then use cin to get an int from the user. Error check and validate to ensure a legal integer was entered. If not, clear the cin buffer using clear() and ignore() and try again (Note: the buffer still needs to be cleared even if this step was successful).

If a legal integer was entered, check its value to see if it is within the provided minimum and maximum range (inclusive). If the user input was within the range, return the integer. If not, get input again. The range check should be ignored if BOTH the minimum and maximum parameters are 0, so any valid integer is acceptable.

You should be using a loop so that the method does not return until a valid and within range (if the range is not 0) integer was totally provided.

Reference no: EM133201531

Questions Cloud

What decisions-strategies led to its failur or decline : PM607 Strategic Management- Kaplan International Pathways. What decisions/strategies led to its failure/decline? Give an overview of their main competitors.
Identify and evaluate external influences : Identify and evaluate external influences in Economic Conditions that positively and negatively are affecting workforce needs in health care delivery
Find specific format for a person name : Many documents use a specific format for a person's name. Need to write a program whose input is: firstName middleName lastName, and whose output is:
Describe the principles of ethical leadership : Define and describe the principles of ethical leadership. Which two of the five covered in chapter, do you think are the most important? Why?
Determine the minimum and maximum parameters : If a legal integer was entered, check its value to see if it is within the provided minimum and maximum range (inclusive). If the user input was within the rang
Name two monetary and two non-monetary ways : AHS 7615 Topics: Administering Faith-based Human Services Assignment - The Monetary and Non Monetary Ways Discussion, Wilmington University
Worthiness of the franchise investment : Do you agree or disagree with your fellow student's conclusion on the worthiness of the franchise investment they selected and the financing option preferred?
Generate a list of suggested lottery numbers : This assignment will require that you generate a list of suggested lottery numbers using random number generation techniques.
Describe ethnocentrism and prejudice : Define culture and explain the terms related to culture. Define and describe ethnocentrism and prejudice. Give personal examples to support your descriptions.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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