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
- Logiciel algorithme euromillion - Télécharger - Loisirs créatifs
- Logiciel algorithme gratuit - Télécharger - Édition & Programmation
- Algorithme euromillion excel gratuit - Forum Algorithmes / Méthodes
- Algorithme ajout rapide snapchat - Forum Snapchat
- Ajout rapide snap - Forum Snapchat