<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>quadratic equation | Student Projects</title>
	<atom:link href="https://studentprojects.in/tag/quadratic-equation/feed/" rel="self" type="application/rss+xml" />
	<link>https://studentprojects.in</link>
	<description>Microcontroller projects, Circuit Diagrams, Project Ideas</description>
	<lastBuildDate>Sun, 06 Feb 2011 10:44:07 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.7</generator>
	<item>
		<title>Java program to prints all real solutions to the quadratic equation ax2+bx+c = 0</title>
		<link>https://studentprojects.in/software-development/java/java-programs/basic/java-program-prints-real-solutions-quadratic-equation-ax2bxc-0/</link>
					<comments>https://studentprojects.in/software-development/java/java-programs/basic/java-program-prints-real-solutions-quadratic-equation-ax2bxc-0/#comments</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Mon, 07 Feb 2011 10:42:09 +0000</pubDate>
				<category><![CDATA[Basic Programs]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[quadratic equation]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=1365</guid>

					<description><![CDATA[<p>Write a Java program that prints all real solutions to the quadratic equation ax2+bx+c = 0. Read in a, b, c and use the quadratic formula. If the discriminant b2-4ac is negative, display a message stating that there are no real solutions. import java.io.*; class Quadratic { public static void main(String args[])throws IOException { double</p>
<p>The post <a href="https://studentprojects.in/software-development/java/java-programs/basic/java-program-prints-real-solutions-quadratic-equation-ax2bxc-0/">Java program to prints all real solutions to the quadratic equation ax2+bx+c = 0</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>Write a Java program that prints all real solutions to the quadratic equation ax2+bx+c = 0. Read in a, b, c and use the quadratic formula. If the discriminant b2-4ac is negative, display a message stating that there are no real solutions.</p>
<pre lang="java" line="1">
import java.io.*;
class Quadratic
{
	public static void main(String args[])throws IOException
	{
		double x1,x2,disc,a,b,c;
		InputStreamReader obj=new InputStreamReader(System.in);
		BufferedReader br=new BufferedReader(obj);
		System.out.println("enter a,b,c values");
		a=Double.parseDouble(br.readLine());
		b=Double.parseDouble(br.readLine());
		c=Double.parseDouble(br.readLine());
		disc=(b*b)-(4*a*c);
		if(disc==0)
		{
			System.out.println("roots are real and equal ");
			x1=x2=-b/(2*a);
			System.out.println("roots are "+x1+","+x2);
		}
		else if(disc>0)
		{
			System.out.println("roots are real and unequal");
			x1=(-b+Math.sqrt(disc))/(2*a);
			x2=(-b+Math.sqrt(disc))/(2*a);
			System.out.println("roots are "+x1+","+x2);
		}
		else
		{
			System.out.println("roots are imaginary");
		}
	}
}
</pre><p>The post <a href="https://studentprojects.in/software-development/java/java-programs/basic/java-program-prints-real-solutions-quadratic-equation-ax2bxc-0/">Java program to prints all real solutions to the quadratic equation ax2+bx+c = 0</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/java/java-programs/basic/java-program-prints-real-solutions-quadratic-equation-ax2bxc-0/feed/</wfw:commentRss>
			<slash:comments>6</slash:comments>
		
		
			</item>
		<item>
		<title>Java program that prints all real solutions to the quadratic equation ax2+bx+c=0</title>
		<link>https://studentprojects.in/software-development/java/java-programs/basic/java-program-that-prints-all-real-solutions-to-the-quadratic-equation-ax2bxc0/</link>
					<comments>https://studentprojects.in/software-development/java/java-programs/basic/java-program-that-prints-all-real-solutions-to-the-quadratic-equation-ax2bxc0/#comments</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Fri, 02 Oct 2009 14:28:27 +0000</pubDate>
				<category><![CDATA[Basic Programs]]></category>
		<category><![CDATA[program]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[quadratic equation]]></category>
		<category><![CDATA[ax2+bx+c=0]]></category>
		<category><![CDATA[java sourcecodes]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=848</guid>

					<description><![CDATA[<p>Write a Java program that prints all real solutions to the quadratic equation ax2+bx+c=0. Read in a,b,c and use the quadratic formula.If the discriminant b2-4ac is negative, display a message stating that there are no real roots.</p>
<p>The post <a href="https://studentprojects.in/software-development/java/java-programs/basic/java-program-that-prints-all-real-solutions-to-the-quadratic-equation-ax2bxc0/">Java program that prints all real solutions to the quadratic equation ax2+bx+c=0</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>Write a Java program that prints all real solutions to the quadratic equation ax2+bx+c=0. Read in a,b,c and use the quadratic formula.If the discriminant b2-4ac is negative, display a message stating that there are no real roots.</p>
<pre lang="java" escaped="true" line="1">
import java.util.Scanner;
 class solutions
{
	public static void main(String[] args)
	{
		int a,b,c;
		double x,y;
		Scanner s=new Scanner(System.in);
		System.out.println(“Enter the values of a,b, and c”);
		a=s.nextInt();
		b=s.nextInt();
		c=s.nextInt();
		int k=(b*b)-4*a*c;
		if(k<0)
		{
			System.out.println(“No real roots”);
		}
		else
		{
			double l=Math.sqrt(k);
			x=(-b-l)/2*a;
			y=(-b+l)/2*a;
			System.out.println(“Roots of given equation:”+x+” “+y);
		}
	}
} 
</pre>
<p><strong>Output:</strong></p>
<p>Enter the values of a,b,c<br />
1<br />
5<br />
6<br />
Roots of given equation:-3.0   -2.0</p>
<p>Enter the values of a, b, c<br />
1<br />
2<br />
2<br />
No real solutions</p>
<p>Enter the values of a, b, c<br />
1<br />
3<br />
2<br />
Roots of given equation: -2.0  -1.0</p><p>The post <a href="https://studentprojects.in/software-development/java/java-programs/basic/java-program-that-prints-all-real-solutions-to-the-quadratic-equation-ax2bxc0/">Java program that prints all real solutions to the quadratic equation ax2+bx+c=0</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/java/java-programs/basic/java-program-that-prints-all-real-solutions-to-the-quadratic-equation-ax2bxc0/feed/</wfw:commentRss>
			<slash:comments>7</slash:comments>
		
		
			</item>
	</channel>
</rss>
