URI Online Judge Solution 1044 Multiples Solution in C, C++, Java, Python and C# - Online Judge Solution

Latest

It is a free Online judges problems solution list. Here you can find UVA online Judge Solution, URI Online Judge Solution, Code Marshal Online Judge Solution, Spoz Online Judge Problems Solution

Wednesday, July 12, 2017

URI Online Judge Solution 1044 Multiples Solution in C, C++, Java, Python and C#

URI Online Judge Solution 1044 Multiples Solution in C, C++, Java, Python and C#

URI Online Judge Solution 1044 Multiples| Beginner
URI Problem Link - https://www.urionlinejudge.com.br/judge/en/problems/view/1044

Problem Name: 1044 Multiples Code
Problem Number : URI - 1044 Multiples Solution
Online Judge : URI Online Judge Solution
Category: Beginner
Solution Language : C,C plus plus, java, python, c#(c sharp)

URI Online Judge Solution 1044 Multiples Solution in C, C++, Java, Python and C#


URI 1044 Multiples Code in C / URI 1044 solution 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;
}


URI 1044 Multiples Code in C++ / URI 1044 solution in CPP:

#include <iostream>

using namespace std;

int main()
{
 int x, y;

 cin >> x >> y;

 if(x < y){
  if(y % x == 0){cout << "Sao Multiplos" << endl;}
  else{cout << "Nao sao Multiplos" << endl;}
 }else{
  if(x % y == 0){cout << "Sao Multiplos" << endl;}
  else{cout << "Nao sao Multiplos" << endl;}
 }

 return 0;
}


URI 1044 Multiples Code in java/ URI 1044 solution in Java:

import java.util.Scanner;

public class Main {
 
    public static void main(String[] args){
 
        int A, B;
  Scanner input =new Scanner(System.in);
  A = input.nextInt();
  B = input.nextInt();
  if (B % A == 0 || A % B == 0) {
   System.out.print("Sao Multiplos\n");
  }else {
   System.out.print("Nao sao Multiplos\n");
  }
 
    }
 
}


URI 1044 Multiples Code in Python / URI 1044 solution in Python:


URI Solution 1044 Multiples Code / URI 1044 solution in  C# (C Sharp):




Demonstration:

Just implement this in coding. Since having any problem just put a comment below. Thanks



Tags: URI Online Judge Solution, URI OJ Solution list, URI Problems Solution, URI solver, URI all problem solution list, URI 1044 Multiples  code in C, URI 1044 Multiples code in C++, URI Multiples solution in C, URI solution, URI 1044 solution in C,URI 1044 solution in C++-CPP,URI 1044 solution in C# (C sharp),URI 1044 solution in Java,URI 1044 Multiples solution in Python,

1 comment:

  1. Good post man,,


    For basic problem solution you can follow my website.

    https://oloshcoder.org

    ReplyDelete