Afficher la table des racine carrée, des cubes et des puissance

Author:


Download

#include 

int main()
{
  double nombre[11][5];
  double valeur = 0.0;
  int y = 0;
  int x = 0;

  for(y = 0, valeur = 3.0 ; y<11 ; y++, valeur += 0.3)
    nombre[y][0] = valeur;

  for(y = 0 ; y<11 ; y++)
  {
    nombre[y][1] = 1.0/nombre[y][0];
    nombre[y][2] = nombre[y][0]*nombre[y][0];
    nombre[y][3] = nombre[y][0]*nombre[y][0]*nombre[y][0];
    nombre[y][4] = nombre[y][0]*nombre[y][0]*nombre[y][0]*nombre[y][0];
  }

  printf("         x");
  printf("         1/x");
  printf("        x*x");
  printf("         x*x*x");
  printf("      x*x*x*xn");

  for(y = 0 ; y<11 ; y++)
  {
    printf("n");
    for(x = 0 ; x<5 ; x++)
      printf("%15.4lf", nombre[y][x]);
  }
  return 0;
}

Leave a Reply

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