View Code of Problem 50

#include <stdio.h>
#include <math.h>
#include <string.h>
int main()
{
	char a[90];
	int flag=1;
	gets(a);
	int len=strlen(a);
	for(int i=0;i<len;i++){
		if(a[i]<'0'||a[i]>'9'){
			if(flag==1){
				printf("*");
				flag=0;
			}
		}
		else{
			printf("%c",a[i]);
			flag=1;
		}

	}
	printf("\n");
	return 0;
}

Double click to view unformatted code.


Back to problem 50