View Code of Problem 50

#include <stdio.h>
#include <string.h>
//<pre>$Ts!47&*456 a23* +B9k</pre>
int main( ){
	char str[80];
	gets(str);
	int i;
	for(i=0;str[i];i++){
		if(str[i]>='0'&&str[i]<='9')
		printf("%c",str[i]);
		else
		printf("*");
		int k=i;
	    while(str[i]<'0'||str[i]>'9'){
	    	if(!str[i])
	    	break;
	    	i++;
	    	k=i;
	    	if(str[i]>='0'&&str[i]<='9'){
	    		k--;
	    		break;
			}
		}
		i=k;
	}
	return 0;
} 

Double click to view unformatted code.


Back to problem 50