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