View Code of Problem 50

#include<stdio.h>
#include<string.h>
#include<math.h>
void main(){
	char str1[80];
	int l,i;
	gets(str1);
	l=strlen(str1);
	for(i=1;i<l;i++){
		if(str1[i]>=48&&str1[i]<=57){
			if(str1[i-1]<48||str1[i-1]>57)
				printf("*%c",str1[i]);
			else
				printf("%c",str1[i]);
		}
	}
	printf("\n");
}

Double click to view unformatted code.


Back to problem 50