URI Online Judge | 1044
Multiples
Adapted by Neilor Tonin, URI
Brazil
Timelimit: 1
Read two nteger values (A and B). After, the program should print the message "Sao Multiplos" (are multiples) or "Nao sao Multiplos" (aren’t multiples), corresponding to the read values.
Input
The input has two integer numbers.
Output
Print the relative message to the input as stated above.
Input Sample | Output Sample |
6 24 | Sao Multiplos |
6 25 | Nao sao Multiplos |
/ sagorcseblog.blogspot.com
// email:sagor.cse.just@gmail.com
#include<stdio.h>
int main()
{
int a,b,temp;
scanf("%d%d",&a,&b);
if(b>a)
{
temp = b;
b=a;
a=temp;
}
if(a%b==0)
printf("Sao Multiplos\n");
else
printf("Nao sao Multiplos\n");
return 0;
}
Comments
Post a Comment