glx_56de37973380417c75c17f999823807b.txt exo 6 corriges en algorithme https://keidweneth.com/ilrRUQJCUIw6T/60695
الصفحة الرئيسية

exo 6 corriges en algorithme

 

Écrire un programme  qui permet de vérifier une note saisie au  clavier (si la note supérieur à 10 alors il affiche validé sinon non validé  (NB : la note comprise entre 0 et 20 ).


******** En Algorithme ********

Algorithme Variables note :réel Debut Ecrire(" Entrer la note : ") Lire (note) Si(note < 0 ou note > 20) alors Ecrire("Erreur !!" ) FinSi Si( note >= 0 et note < 10) alors Ecrire(" non Validé" ) FinSi Si( note >= 10 et note <= 20) alors Ecrire("Validé" ) Fin

Résultat ==> Entrer la note : 12.5 Validé

Retour vers la liste d'exercices

******** En C ********

#include <stdio.h> int main() { float note ; printf(" Entrer la note : "); scanf("%f",&note); if ( note < 0 || note > 20) printf("Erreur !!" ); if ( note >= 0 && note < 10) printf(" non Valide" ); if ( note >= 10 && note <= 20) printf("Valide" ); return 0; }

Retour vers la liste d'exercices

******** En C++ ********

#include <iostream> using namespace std; int main() { float note ; cout<<" Entrer la note : "; cin>> note; if ( note < 0 || note > 20) cout<<"Erreur !!" ; if ( note >= 0 && note < 10) cout<<" Non Valide" ; if ( note >= 10 && note <= 20) cout<<" Valide"; return 0; }

******** En Python ********

note = float(input("Entrer la note:")) if note <= 20 and note >= 10 : print("Validé ") elif note < 10 and note >= 0 : print("non Validé ") else : print("La note incorrecte !!! ")

الاسمبريد إلكترونيرسالة