View Code of Problem 50

#include<stdio.h>
#include<string.h>
#include<math.h>

int main(){

	
	char a[80];
	gets(a);

	int k=0;
	for(int i=0;i<strlen(a);i++){
	
		if(a[i]>='0'&&a[i]<='9'){
			if(k>0){printf("*");k=0;}
			printf("%c",a[i]);
		}
		else if(i==strlen(a)-1&&k>0)printf("*");
		else {
		
			k++;
			
		}
		
	
	}
	



}

Double click to view unformatted code.


Back to problem 50