C: Affichage des differents types des données avec ‘printf()’

Author:


Download

#include 

int main(void)
{
  char ch;
  float f;
  double d;

  ch = 'a'; //Caractère
  f = 3.14; // Nombre flottant
  d = 3541.20; // Double

  printf("ch = %c, n", ch);
  printf("f = %f, n", f);
  printf("d = %fn", d);

  return 0;
}

Leave a Reply

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