View Code of Problem 50

#include<stdio.h>
#include<string.h>
int main(){
	char str1[80],str2[80];
	int i=0,j=0;
	int count=0;
	puts(str1);
	for(i=1;i<strlen(str1);i++){
			if(str1[i]>='0'&&str2[i]<='9'){
				str2[j]=str1[i];
				j++;
			}
			else{
				count++;
				if(count==1){
					str2[j]='*';
					j++;	
					count=0;
				}
			}
		}
	if(str2[j]='\0');
		puts(str2);
    }	 

Double click to view unformatted code.


Back to problem 50