Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- ifstream fin("numere.in");
- int main()
- {
- int n,nr=0;
- while(fin >> n)
- {
- //cout << "Numerele sunt: " << n << "\n";
- if(n%3-1==0) {
- cout << n << " ";
- nr++;
- }
- }
- if(nr==0)
- {
- cout<<"Nu exista";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement