665. Multiple

665. Multiple

Read two positive integer values ​​(A and B). If one of them is an integer multiple of the other, output "Sao Multiplos", otherwise output "Nao sao Multiplos".

Input format

A total of one line, two integers A and B.

Output format

According to the title, output the result.

data range

0<A,B<100

Input sample:

6 24

Sample output:

Sao Multiplos
#include <cstdio>

int main()
{
	int a, b;
	
	scanf("%d%d", &a, &b);
	if (a >= b && a % b == 0) printf("Sao Multiplos\n");
	else if (b > a && b % a == 0) printf("Sao Multiplos\n");
	else printf("Nao sao Multiplos\n");
	
	
	return 0;
}

Guess you like

Origin blog.csdn.net/qq_42465670/article/details/114750898