- #pragma argsused
- #include<iostream.h>
- #include<conio.h>
- #include<math.h> // header file pour utiliser sqrt (racine caree)
-
-
- int main ( void )
- {
- float a,b,c, //variables pour A,B et C
- min, max, //variables pour les zeros
- TPx,TPy; //variables les points tournant
-
-
-
- cout<<" ********** Coded by Benjamin Sayers **********\n\n";
- cout<<" Bienvenue dans mon programme d'equation quadratique!\n\n";
-
-
-
- cout<<"\nEntrer vos valeurs (a.b et c) : \n\n";
- cout<<"\nA = "; cin>>a;
- cout<<"\nB = "; cin>>b;
- cout<<"\nC = "; cin>>c;
- clrscr();
-
- ///////////////////////////////////////////////////////////////////////////////////
-
-
-
- cout<<" ********** Coded by Benjamin.S **********\n\n";
- cout<<"\nA= "<<a<<" B= "<<b<<" C= "<<c<<"\n";
-
- if (a<0)
- {
- cout<<"\n\nle point tournant est un maximum !\n";
- }
- else
- cout<<"\n\nThe point tournant est un minimum !\n";
-
- //point tournant (1eme point)
- TPx = -b / (2 * a);
-
- //point tournat (2eme point)
- TPy =( 4 * a * c - ( b * b ) ) / ( 4 * a );
-
- //verifie si zeros existent
- if( ( ( b * b )- 4 * a * c ) > 0 )
- {
- //calcule le zero (negative)
- min= ( -b - sqrt ( ( b * b )- 4 * a * c ) ) / ( 2 * a );
-
- //calcule le zero (addition)
- max= ( -b + sqrt ( ( b * b )- 4 * a * c ) ) / ( 2 * a );
-
-
- cout<<"\n\nLes zeros sont a ( "<<min<<" , "<<" 0 )"<<" and ( "<<max<<", 0 )";
- }
- else
- cout<<"\nIl n'y a pas de zeros!";
-
-
- cout<<"\n\nLe point tourant est a( "<<TPx<<" , "<<TPy<<" )\n";
-
-
- cout<<"\L'intersection est a ( 0, "<<c<<" )";
-
-
- cout<<"\n\n\nPress any key to exit...\n";
-
- getch();
-
- return 0;
-
- }
-
#pragma argsused
#include<iostream.h>
#include<conio.h>
#include<math.h> // header file pour utiliser sqrt (racine caree)
int main ( void )
{
float a,b,c, //variables pour A,B et C
min, max, //variables pour les zeros
TPx,TPy; //variables les points tournant
cout<<" ********** Coded by Benjamin Sayers **********\n\n";
cout<<" Bienvenue dans mon programme d'equation quadratique!\n\n";
cout<<"\nEntrer vos valeurs (a.b et c) : \n\n";
cout<<"\nA = "; cin>>a;
cout<<"\nB = "; cin>>b;
cout<<"\nC = "; cin>>c;
clrscr();
///////////////////////////////////////////////////////////////////////////////////
cout<<" ********** Coded by Benjamin.S **********\n\n";
cout<<"\nA= "<<a<<" B= "<<b<<" C= "<<c<<"\n";
if (a<0)
{
cout<<"\n\nle point tournant est un maximum !\n";
}
else
cout<<"\n\nThe point tournant est un minimum !\n";
//point tournant (1eme point)
TPx = -b / (2 * a);
//point tournat (2eme point)
TPy =( 4 * a * c - ( b * b ) ) / ( 4 * a );
//verifie si zeros existent
if( ( ( b * b )- 4 * a * c ) > 0 )
{
//calcule le zero (negative)
min= ( -b - sqrt ( ( b * b )- 4 * a * c ) ) / ( 2 * a );
//calcule le zero (addition)
max= ( -b + sqrt ( ( b * b )- 4 * a * c ) ) / ( 2 * a );
cout<<"\n\nLes zeros sont a ( "<<min<<" , "<<" 0 )"<<" and ( "<<max<<", 0 )";
}
else
cout<<"\nIl n'y a pas de zeros!";
cout<<"\n\nLe point tourant est a( "<<TPx<<" , "<<TPy<<" )\n";
cout<<"\L'intersection est a ( 0, "<<c<<" )";
cout<<"\n\n\nPress any key to exit...\n";
getch();
return 0;
}