View Code of Problem 50

#include<stdio.h>
#include<string.h>
int main()
{
	int i, n;
	char str1[1000];
	gets(str1);
	n = strlen(str1);
	for (i = 0; i < n; i++)
	{
		if (((str1[i]<'0') || (str1[i]>'9')) && ((str1[i + 1] >= '0') && (str1[i + 1] <= '9')))
			printf("*");
		else if ((str1[i] >= '0') && (str1[i] <= '9'))
			printf("%c", str1[i]);
	}
	return 0;
}

Double click to view unformatted code.


Back to problem 50