Bonjour,
je voudrais exécuter ce code mais il me retourne des erreurs et ça ne tourne pas!
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#include<stdio.h>
#include<conio.h>
int main()
{
int i,n,t1[5],t[5];
 
 
 
 
  printf("saisir la taille tu premier tableau.\n");
 
  scanf("%d",&n);
 
 
 
  printf("saisir les elements du 1er tableau.\n");
 
  for(i=0;i<n;i++) {
                              scanf("%d",&t[i]);
                   }
 
 
 
void melange ( int tab[], size_t n);
{
    size_t i, j;
    int temp;
    if( n == 1 )
        return;
 
    for( i=0; i< n; i++)
    {
        // j is a random number between i and n-1 (included)
        j = i + rand() % (n-i);
        //swap the values of tab[i] and tab[j]
        temp = tab[i];
        tab[i] = tab[j];
        tab[j] = temp;
    }  
}
return 0;
quelqu'un a une idée?
Merci.