Skip to content

Instantly share code, notes, and snippets.

@gsmcwhirter
Last active October 13, 2015 16:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gsmcwhirter/311a76a23f40f040b4ce to your computer and use it in GitHub Desktop.
Save gsmcwhirter/311a76a23f40f040b4ce to your computer and use it in GitHub Desktop.
public String mystery(String str)
{
int i = 0;
while (i < str.length())
{
if (str.substring(i,i+1).equals("c"))
{
str = str.substring(0,i) + str.substring(i+1);
}
i++;
}
return str;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment