Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- int main()
- {
- unsigned n,a[100],i=0,ok=0;
- ifstream fin("bac.txt");
- cout<<"n=";cin>>n;
- while(!fin.eof())
- {
- fin>>a[i++];
- }
- for(int i=0;i<n;i++)
- if(a[i]%n==0)
- {
- ok=1;
- cout<<a[i]<<" ";
- }
- if(ok==0)
- cout<<"Nu exista";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement