Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- int sfx(int x)
- {
- if(((x%1000)/100)>((x%100)/10) && ((x%100)/10)>(x%10))
- return 1;
- return 0;
- }
- int main()
- {
- int x, c=0;
- ifstream f("date.in");
- while(f>>x)
- {
- if(sfx(x)==1 && sfx(x/1000)==1)
- c++;
- }
- cout<<c;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement