Very interesting
hamidzaza
Messages postés
2
Date d'inscription
Statut
Membre
Dernière intervention
-
hamidzaza Messages postés 2 Date d'inscription Statut Membre Dernière intervention -
hamidzaza Messages postés 2 Date d'inscription Statut Membre Dernière intervention -
Bonjour,
g un ptt probleme d'écrire cet algorithme: bon qui permet se saisir d'abord une liste de 30 notes d'élèves , puis qui affiche la note maximale.
g un ptt probleme d'écrire cet algorithme: bon qui permet se saisir d'abord une liste de 30 notes d'élèves , puis qui affiche la note maximale.
A voir également:
- Very interesting
- Musique very bad trip 2 - Forum Musique / Radio / Clip
- Phil collins very bad trip ✓ - Forum Cinéma / Télé
- Générique de fin (photos) de Very Bad Trip 2 - Forum Cinéma / Télé
- Chanson Phil Collins - Forum Musique / Radio / Clip
- The system has detected the storage capacity of the battery stated below to be very low - Forum Matériel & Système
2 réponses
salut
1.Initialize an array of 30 element like int grades[30] and int grade to hold given grade from the user
2. Make a dialog mesage with the user to get grades from him:
int i=0;
while (i > 30){
printf(''Enter grade: ");
scanf("%d",&grade);
grade[i]=grade;
i++;
}
3. After storing all grade in the array, then start comparing them to get the maximum(highest result).
int max=grades[0];
for(int j=0; j < i ; j++){
if(max<grade[j]){
max=grade[j];
}
}
4. The value is max will be the highest note
cheers.
1.Initialize an array of 30 element like int grades[30] and int grade to hold given grade from the user
2. Make a dialog mesage with the user to get grades from him:
int i=0;
while (i > 30){
printf(''Enter grade: ");
scanf("%d",&grade);
grade[i]=grade;
i++;
}
3. After storing all grade in the array, then start comparing them to get the maximum(highest result).
int max=grades[0];
for(int j=0; j < i ; j++){
if(max<grade[j]){
max=grade[j];
}
}
4. The value is max will be the highest note
cheers.