First commit
This commit is contained in:
5
IUT/Info1/TD/Exercices/Deg2Far/Deg2Far.cpp
Normal file
5
IUT/Info1/TD/Exercices/Deg2Far/Deg2Far.cpp
Normal file
@@ -0,0 +1,5 @@
|
||||
#include "Deg2Far.h"
|
||||
|
||||
float deg2Far(float deg) {
|
||||
return 1.8 * deg + 32;
|
||||
}
|
||||
1
IUT/Info1/TD/Exercices/Deg2Far/Deg2Far.h
Normal file
1
IUT/Info1/TD/Exercices/Deg2Far/Deg2Far.h
Normal file
@@ -0,0 +1 @@
|
||||
float deg2Far(float);
|
||||
BIN
IUT/Info1/TD/Exercices/Deg2Far/deg2far
Normal file
BIN
IUT/Info1/TD/Exercices/Deg2Far/deg2far
Normal file
Binary file not shown.
16
IUT/Info1/TD/Exercices/Deg2Far/main.cpp
Normal file
16
IUT/Info1/TD/Exercices/Deg2Far/main.cpp
Normal file
@@ -0,0 +1,16 @@
|
||||
#include <iostream>
|
||||
#include "Deg2Far.h"
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
// Convertion Degrés vers Farenheight
|
||||
float deg;
|
||||
float far;
|
||||
|
||||
cout << "Entrez la température en degrés : ";
|
||||
cin >> deg;
|
||||
|
||||
far = deg2Far(deg);
|
||||
cout << deg << "°C = " << far << "°F" << endl;
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user