New Member FAQ
|
Forums
|
Earn Revenue
Resources
Entrance
Ask Experts
Exam Papers
Jobs
English
Projects
Universities
Colleges
Courses
Schools
Training
My India
Members
|
Communities
|
Business Directory
|
Classifieds
|
Reviews
|
Silverlight Games
|
Peer Appraisal
|
Bookmarks
|
Polls
|
Mentors
|
Links
|
B.Tech Projects
|
Lobby
|
Gift Shop
|
Chat
My Profile
Sign In
Register
AdSense Revenue
Active Members
Today
N K Ravishanka...
(50)
sridevi
(37)
Agnes Mary
(30)
Last 7 Days
Mr. Anindya
(2274)
PROSENJIT MANN...
(2013)
Pawan Bahuguna
(1251)
more...
Awards & Gifts
Online Exams
Aptitude Questions
General Aptitude Tests
Medical Entrance
Engineering Entrance
Bank Tests
TOEFL & IELTS Questions
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.
Java program that prints all real solutions to the quadratic equation
Posted Date: Total Responses:
0
Posted By:
Sunil Reddy
Member Level:
Platinum
Points/Cash
: 3
import java.lang.*;
import java.math.*;
class Quad
{
public static void main(String arg[])
{
int a,b,c;
a=Integer.parseInt(arg[0]);
b=Integer.parseInt(arg[1]);
c=Integer.parseInt(arg[2]);
int delta=(b*b)-(4*a*c);
if(delta<0)
{
System.out.println("roots are imaginary,no real values");
}
else
{
double x1=(-b+Math.sqrt(delta))/(2*a);
double x2=(-b-Math.sqrt(delta))/(2*a);
System.out.println(x1+" "+x2);
}
}
}
Project Feedbacks
No feedbacks found. Be the first to respond and make money from
revenue sharing program
.
Post Feedback
You must
Sign In
to post a feedback.
Next Project:
Time Server
Previous Project:
Applet that demonstrates a Java2D GeneralPath
Return to Project Index
Post New Project
Related Projects
C++ program : TO DEMONSTRATE NESTED LOOP
Poly Sum- IObjectOperation in C Sharp
PASS 1 OF AN TWO PASS ASSEMBLER
Time Server
College ALumni
Advertise Here
Contact Us
Advertise
Editors
Privacy Policy
Terms Of Use
ISC Technologies.
2006 - 2009 All Rights Reserved.