Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<string.h>
- using namespace std;
- int main ()
- {
- char x[20];
- int i,k1,k2;
- cin.get(x,20);
- cin.get();
- strcpy(x,"bac2009");
- k1=strlen(x);
- k2=0;
- for (i=0;i<strlen(x);i++)
- if(x[i]>='0'&& x[i]<='9')
- k2=k2+1;
- cout << k1<<" "<<k2;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement