inverser un tableau en c code example
Example: inverser les éléments d'un tableau manuellement en c++
#include <iostream>
using namespace std;
int main() {
int array1[5]={1,2,3,4,5};
int array2[5];
for(int i=0;i<5;i++) {
array2[i]=array1[(5-i)-1];
cout<<"Number at index"<<i<<"="<<array2[i]<<endl;
}
}