Menu


.

Write a program to find square root of equation.

#include< iostream.h >

#include< conio.h >

void main()

{

clrscr();

int a,b,c,x,y;

cout<<"Please enter a,b,c";

cin>>a>>b>>c;

double s=sqrt(b*b-4*a*c);

x=(-1*b+s)/2*a;

y=(-1*b-s)/2*a;

cout<<"Roots are"<<x<<y;

getch();

}




Enjoy our courses Today