First commit
This commit is contained in:
10
IUT/Info1/TD/Exercices/temp/2.7.md
Normal file
10
IUT/Info1/TD/Exercices/temp/2.7.md
Normal file
@@ -0,0 +1,10 @@
|
||||
Lexique:
|
||||
somme_eur: un réel
|
||||
somme_francs: un réel
|
||||
taux_francs_vers_eur: constante réèle := 6.55957
|
||||
Algorithme:
|
||||
Ecrire("Saisir une somme en francs")
|
||||
Lire(somme_francs)
|
||||
somme_eur <- somme_francs / taux_francs_vers_eur
|
||||
Ecrire(somme_eur, "€ font ", somme_francs, " francs")
|
||||
|
||||
BIN
IUT/Info1/TD/Exercices/temp/exemple
Normal file
BIN
IUT/Info1/TD/Exercices/temp/exemple
Normal file
Binary file not shown.
5
IUT/Info1/TD/Exercices/temp/exemple.cpp
Normal file
5
IUT/Info1/TD/Exercices/temp/exemple.cpp
Normal file
@@ -0,0 +1,5 @@
|
||||
#include "exemple.h"
|
||||
|
||||
float f(float x) {
|
||||
return 2 * x + 1;
|
||||
}
|
||||
1
IUT/Info1/TD/Exercices/temp/exemple.h
Normal file
1
IUT/Info1/TD/Exercices/temp/exemple.h
Normal file
@@ -0,0 +1 @@
|
||||
float f(float x);
|
||||
17
IUT/Info1/TD/Exercices/temp/main.cpp
Normal file
17
IUT/Info1/TD/Exercices/temp/main.cpp
Normal file
@@ -0,0 +1,17 @@
|
||||
#include <iostream>
|
||||
#include "exemple.h"
|
||||
using namespace std;
|
||||
|
||||
|
||||
int main() {
|
||||
float x;
|
||||
float y;
|
||||
|
||||
cout << "Entrez un x" << endl;
|
||||
cin >> x;
|
||||
|
||||
y = f(x);
|
||||
|
||||
cout << "y = " << y << endl;
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user