String characters disappear

0

Good morning I'm doing the Problem 1234 of uri , but I did the code and I saw that some characters disappear for some reason I do not know, when I type a phrase that the site shows, some characters disappear, could help me

Follow the code

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

int main(int argc, char** argv)
{
  char nome[100], aux[100];
  int c = 0, cont = 0, tam;
  while(gets(nome) != NULL)
  {
     tam = strlen(nome);
     for(int i = 0; i < tam; i++)
     {
        if(!isspace(nome[i]))
        {
            cont++;
            if(cont % 2 == 0)
            {
                if(isupper(nome[cont]))
                {
                    aux[c++] = nome[cont];
                }
                else
                {
                    aux[c++] = toupper(nome[cont]);
                }
            }
            else
            {
                if(islower(nome[cont]))
                {
                    aux[c++] = nome[cont];
                }
                else
                {
                    aux[c++] = toupper(nome[cont]);
                }
            }
        }
    }
    aux[c] = '
#include <stdio.h>
#include <string.h>
#include <ctype.h>

int main(int argc, char** argv)
{
  char nome[100], aux[100];
  int c = 0, cont = 0, tam;
  while(gets(nome) != NULL)
  {
     tam = strlen(nome);
     for(int i = 0; i < tam; i++)
     {
        if(!isspace(nome[i]))
        {
            cont++;
            if(cont % 2 == 0)
            {
                if(isupper(nome[cont]))
                {
                    aux[c++] = nome[cont];
                }
                else
                {
                    aux[c++] = toupper(nome[cont]);
                }
            }
            else
            {
                if(islower(nome[cont]))
                {
                    aux[c++] = nome[cont];
                }
                else
                {
                    aux[c++] = toupper(nome[cont]);
                }
            }
        }
    }
    aux[c] = '%pre%';
    printf("%s\n", aux);
    memset(aux, 0, sizeof(aux));
    c = 0, cont = 0;
  }
   return 0;
}
'; printf("%s\n", aux); memset(aux, 0, sizeof(aux)); c = 0, cont = 0; } return 0; }
    
asked by anonymous 20.02.2018 / 16:30

0 answers