Calculer la racine carrée des valeurs d’un tableau

Author:

 calcul
Download

#include 
#include


int main( )
{

	double x[ ] = { 0.5, 0.0, 2.0, 8.0, -0.0, -0.5 };

for ( int i = 0; i < ( sizeof(x) / sizeof(double) ); i++)
{
  printf("Racine carrée de %.2F = %.4Fn", x[i], sqrt( x[i] ) );
  if ( errno )
    perror( __FILE__ );
}

return 0;

}

Leave a Reply

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