Skip to content

Commit

Permalink
uploaded
Browse files Browse the repository at this point in the history
  • Loading branch information
mokshablr committed Aug 31, 2023
1 parent 8dafdbb commit 9147425
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions Level-A/208A-Dubstep.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#include<stdio.h>
#include<string.h>

int main(){
char str[201];
scanf("%s", str);

char temp;
int ini =0, i=0, ctr=0;

for(int i=0; i<strlen(str); i++){
if(str[i] == 'W' && str[i+1] == 'U' && str[i+2] == 'B'){
i+=2;

for(int j= i+1; j < strlen(str); j++){
if(str[j] == 'W' && str[j+1] == 'U' && str[j+2] == 'B'){
j+=2;
i+=3;
continue;
}
else{
break;
}
}
if(ini != 0){
printf(" ");
}
else{
ini = 1;
}
}
else{
printf("%c", str[i]);
if(ini == 0){
ini = 1;
}
}
}
}

0 comments on commit 9147425

Please sign in to comment.