Exemplo 03 – C++ Tabela Ascii

Converter caractere digitado para seu correspondente da Tabela Ascii

#include <stdio.h>

#include <stdlib.h>

#include <locale.h>

#include <conio.h>

main(){

       setlocale(LC_ALL,"Portuguese");

       system("color B1");

       char ch;

       printf("\n\n\tTabela ASCII!\n\t");

       for (ch=getch();ch!="X";ch=getch()){

        printf("\n\tPróximo Caractere: %c",ch+1);

             _sleep(50);

       }

            

       system("PAUSE>nul");

       return 0;

}

Compartilhe!

Deixe um comentário