First commit
This commit is contained in:
19
IUT/Info1/TD/Exercices/2.6_moyenne/2.6.cpp
Normal file
19
IUT/Info1/TD/Exercices/2.6_moyenne/2.6.cpp
Normal file
@@ -0,0 +1,19 @@
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
float note1;
|
||||
float note2;
|
||||
float note3;
|
||||
int const nombreDeNotes = 3;
|
||||
float moyenne;
|
||||
|
||||
cout << "Saisir les 3 notes" << endl;
|
||||
cin >> note1 >> note2 >> note3;
|
||||
|
||||
moyenne = (note1 + note2 + note3) / nombreDeNotes;
|
||||
|
||||
cout << "Le moyenne est de " << moyenne << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user