First commit
This commit is contained in:
31
IUT/Info1/DS/trace.cpp
Normal file
31
IUT/Info1/DS/trace.cpp
Normal file
@@ -0,0 +1,31 @@
|
||||
#include <iostream>
|
||||
|
||||
#include "trace.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
float Saisie_plusgrand(float min) {
|
||||
float max;
|
||||
|
||||
do {
|
||||
cout << "Saisir";
|
||||
cin >> max;
|
||||
} while (max <= min);
|
||||
|
||||
return max;
|
||||
}
|
||||
|
||||
float f(float x) {
|
||||
float y;
|
||||
const float PI = 3.141565358979;
|
||||
|
||||
if (x < 0) {
|
||||
y = ((float)3/7) * (cos(x) - 1);
|
||||
} else if (x <= 2*PI) {
|
||||
y = sin(x) * 2;
|
||||
} else {
|
||||
y = sin(3*x)/3;
|
||||
}
|
||||
|
||||
return y;
|
||||
}
|
||||
Reference in New Issue
Block a user