Exemple d’utilisation de la boucle ‘do…while’ en C/C++

Author:


Download

#include 
#include 

int main(void)
{
/*
 obtenir le code ASCII des caractères
  */
  char ch;
  printf("Tapez un caractère('q' pour quitter):");
  do {
    ch = getchar();
	if(isgraph(ch))
    printf("Le code ASCII de '%c' est :%dn",ch,ch);
  } while (ch != 'q');

  return 0;
}

Leave a Reply

Your email address will not be published. Required fields are marked *