Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- int cmmdc(int a, int b)
- {
- while(a!=b)
- {
- if(a>b)
- a=a-b;
- else
- b=b-a;
- }
- return a;
- }
- int main()
- {
- int n, x,v[100], poz=0;
- ifstream f("NUMERE.IN");
- f>>n;
- while(f>>x)
- {
- v[poz]=x;
- poz++;
- }
- for(int i=0; i<n; i++)
- {
- cmmdc()??;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement