Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include<fstream>
- using namespace std;
- long a[51];
- int n,m,k=1;
- void citire()
- {
- ifstream fin("mult.in");
- fin>>n;
- for (int i=1; i<=n; i++)
- fin>>a[i];
- }
- int prelucrare()
- {
- for(int i=1; i<=n; i++)
- for(int j=i+1; j<=n; j++)
- if(a[i]==a[j]) return 0;
- return 1;
- }
- int main()
- {
- citire();
- if(prelucrare()) cout<<"da";
- else cout<<"nu";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement