My Profile
Active Members
TodayLast 7 Days
more...
Awards & Gifts
Online Exams
Fresher Jobs
Our fresher job section is exclusively for fresh graduates! Find jobs for freshers in major Indian
cities including Bangalore, Chennai, Hyderabad, Pune or Kochi
Resources
Find educational articles, blogs, discussion threads and other resources.
Colleges
Find details about any college in India or search for courses.
|
C Program for Quadratic equation
Posted Date: 18 Jun 2008 Resource Type: Articles/Knowledge Sharing Category: Computer & Technology
|
Posted By: J.Jerome Jernix Member Level: Silver Rating: Points: 2
|
#include void main() { int a,b,c,d,e,f,g; clrscr(); printf(“Enter the three values”); scanf(“%d%d%d”,&a&b&c); d=((b*b)-(4*a*c)); if(d==0) { printf(“Roots are real and equal”); f=-b/(2*a); printf(“x1=%d\nx2=%d”,f,f”); } else if(d>0) { printf(“Roots are real and distinct”); e=sqrt(d); f=(-b+e)/(2*a); g=(-b-e)/(2*a); printf(“x1=%d\nx2=%d”,f,g); } else { printf(“Roots are imaginary”); d=-d; e=sqrt(d); f=-b/(2*a); g=e/(2*a); printf(“x1=%d+%d\nx2%d-%d”,f,g,f,g); } getch(); }
|
Responses
|
No responses found. Be the first to respond and make money from revenue sharing program.
|
|
Watch TV Channels
|