View Code of Problem 50

#include "stdio.h"
#include "math.h"
#include "string.h"

void main()
{
	int i,j,k;
	char s[100];
	int count;
	gets(s);
	for(i=0;s[i]!='\0';i++)
	{
		count=0;
		for(;s[i]!='\0'&&(s[i]<'0'||s[i]>'9');i++)
			count++;
		if(s[i+1]=='\0')
			break;
		if(count>0)
			printf("*");
		if(s[i]>='0'&&s[i]<='9')
			printf("%c",s[i]);
	}
}

Double click to view unformatted code.


Back to problem 50