Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Develop a flow chart and write a c program to find the roots
of a quadratic equation ax2+bx+c=0 using switch and break
statement.

Answer Posted / naveen kumar.gembali

#include<stdio.h>
#include<conio.h>
main()
{
float a,b,c,r1,r2,d;
printf("enter a,b,c values");
scanf("%f%f%f",&a,&b,&c);
d=b*b-4*a*c;
if(d>0)
{
printf("the roots are real and unequal");
r1=(-b-sqrtd)/2*a;
r2=(-b+sqrtd)/2*a;
printf("the roots are %f%f",r1,r2);
}
else
if(d=0)
{
printf("the roots are real and equal");
r1=-b/2*a;
r2=r1;
printf("the roots are %f%f",r1,r2);
}
elseif(d<0)
{
printf("the roots are imaginary");
}
getch();
}
@naveenkumar.gembali@

Is This Answer Correct ?    8 Yes 13 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you explain what keyboard debouncing is, and where and why we us it? please give some examples

2183


What are formal parameters?

1101


How to delete a node from linked list w/o using collectons?

2769


What does %d do in c?

952


What is #line?

1037


What is difference between scanf and gets?

1253


what is the difference between north western polytechnique university and your applied colleges?? please give ur answers for this. :)

2392


What are 'near' and 'far' pointers?

1022


What is the -> in c?

998


What is getch () for?

1205


Explain what math functions are available for integers? For floating point?

1100


What is the difference between test design and test case design?

2079


When can a far pointer be used?

1011


Create a structure to specify data on students as given below: Roll number, Name, Department, Course, and Year of joining. Assume that there are not more than 450 students in the collage. (a) Write a function to print the names of all students who joined in the last 3 years. (b) Write a function to print the data of a student whose roll numbers are divisible by 4.

1097


differentiate built-in functions and user – defined functions.

1073