Convert character

-3
char converte_minusculo (char *s) // porque esta errada
{
    int posicao = 0;
    while (s[posicao] != '
char converte_minusculo (char *s) // porque esta errada
{
    int posicao = 0;
    while (s[posicao] != '%pre%')
    {
      if(s[posicao] >= 65 && s[posicao] <= 90)
        return s[posicao] + 32;
      else
          return s[posicao];
      posicao++;
    }
}
') { if(s[posicao] >= 65 && s[posicao] <= 90) return s[posicao] + 32; else return s[posicao]; posicao++; } }

It's not returning any value; I also do not know if the function type is the same. I need to return the converted values to main() .

    
asked by anonymous 11.05.2018 / 19:44

2 answers

0
char converte_minusculo (char *s[30])
{
    int posicao = 0;

    while (s[posicao] != '
char converte_minusculo (char *s[30])
{
    int posicao = 0;

    while (s[posicao] != '%pre%')
    {
        if(s[posicao] >= 65 && s[posicao] <= 90)
        {
            s[posicao] + 32;
        }

        posicao++;
    }
    return s;
}
') { if(s[posicao] >= 65 && s[posicao] <= 90) { s[posicao] + 32; } posicao++; } return s; }
    
12.05.2018 / 05:49
0
void converte_minusculo(char s[]) {
    int posicao = 0;
    while (s[posicao] != '
void converte_minusculo(char s[]) {
    int posicao = 0;
    while (s[posicao] != '%pre%') {
        if (s[posicao] >= 'A' && s[posicao] <= 'Z') {
            s[posicao] = s[posicao] - 'A' + 'a';
        }
        posicao++;
    }
}
') { if (s[posicao] >= 'A' && s[posicao] <= 'Z') { s[posicao] = s[posicao] - 'A' + 'a'; } posicao++; } }
    
12.05.2018 / 06:08