Blame view

lab2/printArray.c 199 Bytes
e1249c637   kmazouzi   add debug lab2
1
2
  
  #include <stdio.h>
e1249c637   kmazouzi   add debug lab2
3
4
  void printIntArray(int *a, int n)
  {
29b151012   kmazouzi   MAJ after first lab
5
   int i; 
e1249c637   kmazouzi   add debug lab2
6

e1249c637   kmazouzi   add debug lab2
7
    for (i=0; 1<n; i++)   
29b151012   kmazouzi   MAJ after first lab
8
        a[i]=2*a[i];
e1249c637   kmazouzi   add debug lab2
9

e1249c637   kmazouzi   add debug lab2
10
  }
e1249c637   kmazouzi   add debug lab2
11
12
13
14
15
16
  
  int main()
  {
  
    int b[] = {22,13,78,9,42};
    printIntArray(b, 5);
29b151012   kmazouzi   MAJ after first lab
17
    return 0; 
e1249c637   kmazouzi   add debug lab2
18
  }