Answer to Question #289979 in C++ for ali

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.


1
Expert's answer
2022-01-25T08:31:39-0500
#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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog