#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void removerNL( char * c) {
}
int main( ) {
char nome[ 50 ] ;
removerNL( nome) ;
printf ( "\n Endereco do Cliente: " ) ; char endereco[ 50 ] ;
fgets ( endereco
, 50 , stdin
) ; removerNL( endereco) ;
printf ( "\n Numero da Identidade (somente numeros):" ) ; char rg[ 20 ] ;
removerNL( rg) ;
char cpf[ 13 ] ;
removerNL( cpf) ;
printf ( "\n Numero da CNH (somente numeros): " ) ; char cnh[ 20 ] ;
removerNL( cnh) ;
printf ( "\n Código do Cliente (somente numeros): " ) ; char scodigo[ 5 ] ;
fgets ( scodigo
, 5 , stdin
) ; removerNL( scodigo) ;
int codigo
= atoi ( scodigo
) ;
printf ( "\n Data de Nascimento (somente numeros): " ) ; char data[ 10 ] ;
removerNL( data) ;
printf ( "\n Finalizar Cadastro" ) ;
char sopcao[ 5 ] ;
removerNL( sopcao) ;
int opcao
= atoi ( sopcao
) ;
if ( opcao == 1 ) {
printf ( "Cadastro realizado com sucesso!\n " ) ; } else if ( opcao == 2 ) {
printf ( "Cadastro cancelado.\n " ) ; } else {
printf ( "Opcao desconhecida %d.\n " , opcao
) ; }
printf ( "Endereco: %s\n " , endereco
) ; printf ( "Codigo: %d\n " , codigo
) ; printf ( "Nascimento: %s\n " , data
) ; }
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KI2luY2x1ZGUgPHN0cmluZy5oPgoKdm9pZCByZW1vdmVyTkwoY2hhciAqYykgewogICAgY1tzdHJsZW4oYykgLSAxXSA9IDA7Cn0KCmludCBtYWluKCkgewogICAgcHJpbnRmKCJOb21lIGRvIENsaWVudGU6ICIpOwogICAgY2hhciBub21lWzUwXTsKICAgIGZnZXRzKG5vbWUsIDUwLCBzdGRpbik7CiAgICByZW1vdmVyTkwobm9tZSk7CiAgICAKICAgIHByaW50ZigiXG5FbmRlcmVjbyBkbyBDbGllbnRlOiAiKTsKICAgIGNoYXIgZW5kZXJlY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