Probléme en algorithme
Résolu
Hanan
-
Hanan -
Hanan -
Bonjour,
qlq peut m'aider pr resoudre l'exercice suivant:
Ecrire un algorithme qui renverse un tableau (Si le tableau est trié en ordre croissant, il
devient trié par ordre décroissant).
je propose ça mais je trouve po la bon execution :
#include <stdio.h>
void main(){
int i;
int t[6];
int tab[6];
for(i=1;i<=5;i++){
printf("saisez l'élément",i);
scanf("%d",&t[i]);
} for(i=1;i<=5;i++)
tab[i]=t[6-i-1];
for(i=1;i<=5;i++)
printf("%d\t",tab[i]);
}
**********
merci d'avance
qlq peut m'aider pr resoudre l'exercice suivant:
Ecrire un algorithme qui renverse un tableau (Si le tableau est trié en ordre croissant, il
devient trié par ordre décroissant).
je propose ça mais je trouve po la bon execution :
#include <stdio.h>
void main(){
int i;
int t[6];
int tab[6];
for(i=1;i<=5;i++){
printf("saisez l'élément",i);
scanf("%d",&t[i]);
} for(i=1;i<=5;i++)
tab[i]=t[6-i-1];
for(i=1;i<=5;i++)
printf("%d\t",tab[i]);
}
**********
merci d'avance
A voir également:
- Probléme en algorithme
- Algorithme euromillion excel gratuit - Télécharger - Loisirs créatifs
- Algorithme ajout rapide snapchat - Forum Snapchat
- Fonction puissance algorithme - Forum Algorithmes / Méthodes
- Algorithme keno excel - Forum LibreOffice / OpenOffice
- Algorithme application pc - Télécharger - Édition & Programmation