SHARE
TWEET

Untitled

Dizzy3113 Nov 17th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <fstream>
  3. using namespace std;
  4.  
  5. int cmmdc(int a, int b)
  6. {
  7.     while(a!=b)
  8.     {
  9.         if(a>b)
  10.             a=a-b;
  11.         else
  12.             b=b-a;
  13.     }
  14.     return a;
  15. }
  16. int main()
  17. {
  18.    int n, x,v[100], poz=0;
  19.    ifstream f("NUMERE.IN");
  20.    f>>n;
  21.    while(f>>x)
  22.    {
  23.        v[poz]=x;
  24.        poz++;
  25.    }
  26.    for(int i=0; i<n; i++)
  27.    {
  28.        cmmdc()??;
  29.    }
  30.    
  31. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top