Answer to Question #334870 in C++ for Rille

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.



1
Expert's answer
2022-04-28T13:21:47-0400
#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";
}	

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