alaminrifat

URI -1044 with C++

Apr 12th, 2020
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. #include<iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int a,b,temp;
  8.     cin>>a>>b;
  9.  
  10.     if(a>b)
  11.     {
  12.         temp = a;
  13.         a = b;
  14.         b = temp;
  15.     }
  16.  
  17.     if(b%a==0)
  18.     {
  19.         cout<<"Sao Multiplos"<<endl;
  20.     }
  21.     else if (b%a != 0)
  22.     {
  23.         cout<<"Nao sao Multiplos"<<endl;
  24.     }
  25.  
  26. }
Advertisement
Add Comment
Please, Sign In to add comment