Answer to Question #330111 in C++ for Viloshini

Question #330111

Write a program to enter a number that should be less than 100 and greater than 9.



1
Expert's answer
2022-04-18T08:40:05-0400
#include <iostream>

using namespace std;

int main()
{
	int num;
	do
	{
		cout << "Please, enter a number than less 100 and greater than 9: ";
		cin >> num;
		if (num < 100 && num>9)
		{
			cout << "Good entering!";
				break;
		}
		else
		{
			cout << "Bad entering! Retry please!" << endl;
		}
	} while (true);
	
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS