Not a member of Pastebin yet?
                        Sign Up,
                        it unlocks many cool features!                    
                - #include <stdlib.h>
 - #include<string.h>
 - int main()
 - {
 - int val;
 - char c []="13.2x+12y";
 - char*p=c;
 - while(*p){
 - if( isdigit(*p)||((*p=='-'||*p=='+') && isdigit(*(p+1)) )){
 - long val=strtol(p, &p,10);
 - printf("%ldn", val);
 - }else{
 - p++;
 - }
 - }
 - }
 
Advertisement
 
                    Add Comment                
                
                        Please, Sign In to add comment