View Code of Problem 50

#include<stdio.h>
int main()
{
	char str[100];
	gets(str);
	for(int i=0;str[i]!='\0';i++)
	{
		if(str[i]>='0'&&str[i]<='9')
		{
			printf("%c",str[i]);
		}
		else if((str[i]<='0'||str[i]>='9')&&((str[i-1]>='0'&&str[i-1]<='9')||i==0))
		{
			printf("*");
		}
		else{
			continue;
		}		
	}
	printf("\n");
	return 0;
} 

Double click to view unformatted code.


Back to problem 50