Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <fstream>
- #include <cstring>
- using namespace std;
- ifstream f("cnp.in");
- ofstream g("cnp.out");
- char c[201], *p,separator[]=",./-+;:!@#$%^&*qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM";
- int q,e,w;
- int main()
- {
- while(f>>c)
- {
- p=strtok(c,separator);
- while(p)
- {
- w=strlen(p);
- if(w==13)
- {
- q=0;
- for(int i=0;i<13;i++)
- {
- if(isdigit(p[i])==0)
- {
- q=1;
- break;
- }
- }
- if(q==0)
- {
- e++;
- g<<p<<endl;
- }
- }
- p=strtok(NULL,separator);
- }
- }
- if(e==0)
- g<<0;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement