/******************************************************************************
Online C Compiler.
Code, Compile, Run and Debug C program online.
Write your code in this editor and press "Run" button to compile and execute it.
*******************************************************************************/
#include <stdio.h>
int main(){
int input;
char input2;
int quantidadeDeValoresConvertidos = scanf("%d%c", &input, &input2);
// O valor de input2 está sendo printado como int, cheque a tabela ASCII para referência
printf("VALOR DE input: %d \nVALOR DE input2: %d\n", input, input2);
// Checa se o (int)input2 é igual a 10 (equivalente a input2 == '\n')
if((int)input2 == 10){
printf("O INPUT É VÁLIDO\n");
} else {
printf("O INPUT É INVÁLIDO\n");
}
printf("\nQUANTIDADE DE VALORES CONVERTIDOS %d", quantidadeDeValoresConvertidos);
return 0;
}