Programar em C: Exercícios Finais: Exercício 2
Origem: Wikilivros, livros abertos por um mundo aberto.
[editar] Exercício 2
#include <stdio.h> #include <stdlib.h> main() { int ch; ch = getchar(); while(ch != 'a') { if(ch != '\n') { printf("O caractere era %c, e o valor %d\n", ch, ch); ch = getchar(); } } system (“pause”); exit(EXIT_SUCCESS); }