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.
  • f B2 − 4AC < 0, the equation represents an Ellipse;
    • if A = C and B = 0, the equation represents a Circle, which is a special case of an ellipse;
  • if B2 − 4AC = 0, the equation represents a Parabola;
  • if B2 − 4AC > 0, the equation represents a Hyperbola;
    • if we also have A + C = 0, the equation represents a Hyperbola.
a conic is a circle if A=C, an ellipse if A is not equal to C but have the same sign, a parabola if either A=0 or C=0 and a hyperbola if A and C have different sign.
#include
#include
#inlude

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???

Replies

You are reading an archived discussion.

Related Posts

CEans, Over the past 6+ years, CrazyEngineers has built its reputation as a leading community of engineers. CrazyEngineers has been built by several engineers like you who've contributed amazing, original...
Hackers in China are selling flash drives with less memory than they advertise. The problem is that the hackers change a log file that makes the flash drive think it...
Hello to everyone!I would like an opinion about a future Msc and I couldn't find a relative sub-forum, so I apologize if it is out of topic with the rest...
hey guyz....im EE engineer.. i have been wondering wer exactly i can work as i dont really understand the applications of the following subjects....i like control systems,signals and systems,DSP .....need...
ok, here is the scenario pc1<-->sw1<-->sw2<-->pc2 1)will ping from pc1 to pc2 work?? why? 2)i configure pc1<-->sw1 interface in vlan 100 and sw1's interface to sw2 interface in vlan 100,...