Discriminant in C++
I'm having some problem on a program i create. the purpose of this program is to identify what type of conic using discriminant.
#include<iostream.h>
#include<conio.h>
#inlude<math.h>
int main ()
{
clrscr ();
int B,A,C, sub;
cout<<"Enter the value for B:";
cin>>B;
cout<<"Enter the value for A:";
cin>>A;
cout<<"Enter the value for C:";
cin>>C;
sub=(B^2)-(4*A*C);
.....end
can someone help me on how to continue it???
- f B2 â 4AC < 0, the equation represents an <a href="https://en.wikipedia.org/wiki/Ellipse" target="_blank" rel="nofollow noopener noreferrer">Ellipse</a>;
- if A = C and B = 0, the equation represents a <a href="https://en.wikipedia.org/wiki/Circle" target="_blank" rel="nofollow noopener noreferrer">Circle</a>, which is a special case of an ellipse;
- if B2 â 4AC = 0, the equation represents a <a href="https://en.wikipedia.org/wiki/Parabola" target="_blank" rel="nofollow noopener noreferrer">Parabola</a>;
- if B2 â 4AC > 0, the equation represents a <a href="https://en.wikipedia.org/wiki/Hyperbola" target="_blank" rel="nofollow noopener noreferrer">Hyperbola</a>;
- if we also have A + C = 0, the equation represents a <a href="https://en.wikipedia.org/wiki/Hyperbola" target="_blank" rel="nofollow noopener noreferrer">Hyperbola</a>.
#include<iostream.h>
#include<conio.h>
#inlude<math.h>
int main ()
{
clrscr ();
int B,A,C, sub;
cout<<"Enter the value for B:";
cin>>B;
cout<<"Enter the value for A:";
cin>>A;
cout<<"Enter the value for C:";
cin>>C;
sub=(B^2)-(4*A*C);
.....end
can someone help me on how to continue it???
0