URI Online Judge Solution 1044 | Multiple - URI 1044 Solution in C,C++,Python

URI Online Judge Solution  1044 | Multiple - URI 1044 Solution in C,C++,Python

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 SampleOutput Sample

6 24

Sao Multiplos

6 25

Nao sao Multiplos

URI Online Judge Solution  1044 | Multiple - URI 1044 Solution in C,C++,Python :

Demonstration:

A multiple is a number that can be divided by another number a certain number of times without a remainder. A factor is one of two or more numbers that divides a given number without a remainder.

N.B: Don't copy paste the code as same. Just try to understand it and try yourself. It would be better for you.


  URI Problem 1044 Solution in C :   

  URI Online Judge 1044 Solve  in C :                                                                             
#include<stdio.h>
int main()
{
    int A, B;
    scanf("%d %d", &A, &B);
    if (B % A == 0 || A % B == 0)
    {
        printf("Sao Multiplos\n");
    }
    else
    {
        printf("Nao sao Multiplos\n");
    }
    return 0;
}

0 Response to URI Online Judge Solution 1044 | Multiple - URI 1044 Solution in C,C++,Python

Post a Comment