Question #334870

Write a C++program to accept two integers and check if it is greater than or equal to 100. If not, return a message "The number is less than 100". Specify the input of first and second of the possible output.



Expert's answer

#include <iostream>

using namespace std;

int main()
{
	int first, second;
	cout << "Please, enter 2 integers: ";
	cin >> first >> second;
	if (first < 100)
		cout << "The first number is less than 100"<<endl;
	if (second < 100)
		cout << "The second number is less than 100";
}	

LATEST TUTORIALS
APPROVED BY CLIENTS