View Code of Problem 50

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

Double click to view unformatted code.


Back to problem 50