Aller au contenu

Mathc complexes/Fichiers c : test01b

Un livre de Wikilivres.


Utilitaires

Installer et compiler ce fichier dans votre répertoire de travail.

c00b.c
/* ------------------------------------ */
/*  Save as :   c00b.c                  */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
/* ------------------------------------ */
int X_stop_w(void)
{
    printf("\n Press   return to continue");
    printf("\n Press X return to stop    ");
    
 return(toupper(getchar())!='X');
}
/* ------------------------------------ */
/* ------------------------------------ */
void fun(void)
{
	clrscrn();
	printf(" Hello word !\n\n");
}
/* ------------------------------------ */
/* ------------------------------------ */
int main(void)
{

do
{
  fun();

} while(stop_w());

  return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */

Exemple de sortie écran :

 Hello word !


 Press   return to continue
 Press X return to stop