1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
| #include "dot.h"
#include "point.h"
#include "fract.h"
#include "fraction.h"
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
fract a,b;
fract add,diff,pro,rapp;
fract ADD,DIFF,PRO,RAPP;
cout<<" saisie de la fraction F1 "<<endl;
saisie_fract (a);
cout<<" saisie de la fraction F2 "<<endl;
saisie_fract (b);
add =add_fract (a,b);
diff=diff_fract (a,b);
pro =pro_fract (a,b);
rapp=rapp_fract (a,b);
cout<<"votre fraction addition vaut "<<"=";
affichage_fract (add);
reduct_fract(add,ADD);
cout<< " FIN "<<endl;
cout<<"votre fraction difference vaut "<<"=";
affichage_fract (diff);
reduct_fract(diff,DIFF);
cout<< " FIN "<<endl;
cout<<"votre fraction produit vaut "<<"=";
affichage_fract (pro);
reduct_fract(pro,PRO);
cout<< " FIN "<<endl;
cout<<"votre fraction rapport vaut "<<"=";
affichage_fract (rapp);
reduct_fract(rapp,RAPP);
cout<< " FIN "<<endl;
point X,Y,Z;
cout << "SAISIE DE X" << endl;
saisir_point(X);
cout << "SAISIE DE Y" << endl;
saisir_point(Y);
// distance(X,Y);
milieu(X,Y,Z);
cout << "AFFICHAGE DU POINT Z" << endl;
afficher_point(Z);
system("PAUSE");
return 0;
} |
Partager