Advertisement
Guest User

test

a guest
Dec 20th, 2014
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.08 KB | None | 0 0
  1.  
  2.  
  3.      
  4.     #include <stdlib.h>
  5.     #include <stdio.h>
  6.     #include <string.h>
  7.     #include <math.h>
  8.  
  9. #define TAILLE_MAX 10
  10.  
  11.      int main (int argc, char** argv) {
  12.      int int_retour, choix;
  13.      int i, j;
  14.      float **A;
  15.  
  16.     printf("\n\t\t\t     _________________________________");
  17.     printf("\n\t\t\t    /                                 /");
  18.     printf("\n\t\t\t   /      -                    -     / ");
  19.     printf("\n\t\t\t  /             Symplexe            /  ");
  20.     printf("\n\t\t\t /      -                    -     /   ");
  21.     printf("\n\t\t\t/_________________________________/\n\n\n\n\n");
  22.    
  23.  
  24.     A=malloc(sizeof(float*)*TAILLE_MAX);
  25.          
  26.     for(i=0; i!=TAILLE_MAX;i++){
  27.             A[i]=malloc(sizeof(float)*TAILLE_MAX);
  28.     }
  29.  
  30.     printf("Quelle est la dimenssion choisie inferieur à 10 ?");
  31.     int_retour=scanf("%d", &choix);
  32.     if(int_retour==0) { exit(-1); }
  33.  
  34.     for(i=0; i!=choix; i++) {
  35.         for(j=0; j!=choix; j++) {
  36.             printf("A[%d][%d]=", i, j );
  37.             int_retour=scanf("%f", &A[i][j]);
  38.             if(int_retour==0) { exit(-1); }
  39.         }
  40.     }
  41.  
  42.     return(0);
  43.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement