The following program will display an integral solution


The following program will display an integral solution to the quadratic equation ax2+bx+c for integral values of a,b, and c, where a,c fall between 0 and 10, while b falls between 1 and 1000. 
read(a,b,c); 
if (a != 0) { 
d = b * b - 4*a*c; 
if (d <0) 
x = 0; 
else 
x=(-b+(int)sqrt(d))/(2*a); 

else { 
x = -c/b; 

if (a*x*x+b*x+c == 0) 
printf("%d is an integral solution",x); 
else 
printf("There is no integral solution"); 
1. Identify all parameters and environment variables. 

2. One major characteristic relates to the discriminant(variable d). Write down a category and an accompanying partition for the discriminant. 

3. Another major characteristic relates to how many roots are real. Write down a category and an accompanying partition for number of real roots. 

4. Another major characteristic relates to how many roots are integer. Write down a category and an accompanying partition for number of integer roots. 

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: The following program will display an integral solution
Reference No:- TGS088786

Expected delivery within 24 Hours