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;
}