Utilisation des arguments de la ligne de commande

Author:


Download


#include 
#include 

int main(int argc, char *argv[])
{
  double total;

  if(argc!=2)
  {
    printf("Aucun argument trouvé");
  }
  else {
    total = atof(argv[1]) * 3.14;
    printf("%f total", total);
  }

  return 0;
}

Leave a Reply

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