Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <cstdio>
- #include <cstring>
- using namespace std;
- int main ()
- {
- char stroka[100];
- puts("BBEDITE STROKU!");
- cin >> (stroka); //gets (stroka);
- int dlina=strlen(stroka);
- char *ptr=0;
- int i=0;
- do
- {
- if(stroka[i]>='0' && stroka[i]<='9')
- {if(!ptr){ptr=&stroka[i];}}
- else
- if(ptr) {stroka[i]='\0';cout<<ptr<<endl;ptr=0;}
- i++;
- }while(stroka[i]!='\0');
- if(ptr) cout<<ptr<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement