You can do like this:
do{
cout <<"\t !!! All scores should range from 0.00 to 100.00!!! \n";
cin >> exam_1;
while(exam_1 < 0.0 || exam_1>100.0);
Repeat this to all inputs
More Related Contents:
- How to pass private class member by constant reference? [closed]
- What is wrong with the following code which calculates a sorted array [closed]
- Why is the result of sizeof implementation defined? [closed]
- C++: Vector subscript out of range
- When should I write the keyword ‘inline’ for a function/method?
- How to implement classic sorting algorithms in modern C++?
- What is a dangling pointer?
- Officially, what is typename for?
- Differences between unique_ptr and shared_ptr [duplicate]
- Why can’t I have a non-integral static const member in a class?
- Avoiding Circular Dependencies of header files [duplicate]
- What does the >?= operator mean?
- Call main() itself in c++?
- What is the best way to take screenshots of a Window with C++ in Windows?
- Identifying primitive types in templates
- Advantages of std::for_each over for loop
- How can I get the path of a Windows “special folder” for a specific user?
- What’s the difference between a const member function and a non-const member function?
- Using pthread in c++
- Is int arr[ ] valid C++?
- variable or field declared void
- Scope with Brackets in C++
- Static and Dynamic/Shared Linking with MinGW
- std::remove_const with const references
- How can I use ANSI Escape Codes for outputting colored text in C and C++?
- Iterating through a Lua table from C++?
- Avoiding extra move in make_unique/make_shared/emplace/etc for structures that use aggregate initialization
- Forcing String to int Function to Consume Entire String
- Why is operator!= removed in C++20 for many standard library types?
- are “seekp” & “seekg” interchangeable?