Question #289979

Write a program that reads two integers and then uses the conditional expression operator to print either “multiple” or “not” according to whether one of the integers is a multiple of the other.


Expert's answer

#include <iostream>
#include <string>




using namespace std;






int main(void){
	int number1;
	int number2;
	cout<<"Enter a number 1: ";
	cin>>number1;
	cout<<"Enter a number 2: ";
	cin>>number2;
	if(number1%number2==0){
		cout<<"Multiple\n\n";
	}else{
	cout<<"Not\n\n";
	}
	


	system("pause");
	return 0;
}

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!

LATEST TUTORIALS
APPROVED BY CLIENTS