Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Calculer la racine carrée d’un ‘Double’

 calcul
{filelink=13361}

 
#include <stdio.h>
#include
<math.h>
 
int main(void)
{
  double i;
 
  for(i = 1.0; i < 20.0; i++) {
    printf("racine carrée de %lf = %lf", i, sqrt(i));
 
    printf("Partie entière = %d ", (int)sqrt(i));
 
    printf("Partie fractionnaire = %lf", sqrt( i ) - (int) sqrt( i ));
 
    printf("n");
  }
 
  return 0;
}

No comments yet.

Leave a Comment