Blame view

deroulement_boucle.c 382 Bytes
42a7f240   Pierre Cwik   optimisation 19 mai
1
2
3
4
5
6
7
8
9
10
11
12
  #include <stdio.h>
  #define TAILLE 100
  #define TAILLE1 500
  #define TAILLE2 500
  int a[TAILLE][TAILLE1][TAILLE2];
  int main(void){
  int resultat=0;
  int i,e,u;
  for(i=0;i<TAILLE;i++) { for(e=0; e < TAILLE1;e++) { for(u=0; u<TAILLE2;u++) {  a[i][e][u]=rand(); }}}
  for(i=0;i<TAILLE;i++) { for(e=0; e < TAILLE1;e++) { for(u=0; u<TAILLE2;u++) {  resultat += a[i][e][u]; }}}
  return resultat;
  }