Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Пример влез abc10ght5js Пример излез 15
- #include <stdio.h>
- int main(){
- char c;
- int zbir=0,br=0,x;
- while((c=getchar())!='\n'){
- if((c>='0') && (c<='9')){
- x=c-'0';
- br=br*10+x;
- }
- else {
- zbir+=br;
- br=0;
- }
- }
- printf("%d", zbir+br);
- }
Add Comment
Please, Sign In to add comment