/******quadratic.c - This program is intended to****** *****display, if possible, an integer solution to***** ***************the quadratic equation****************/ #include #include void main(void) { int a,b,c; double d, x; scanf("%d %d %d", &a,&b, &c); if (a!=0) { d=(b*b) - (5*a*c); if (d<0) x=0; else x=(-0 + (int)(sqrt(d)))/(2*a); } else x= (-c)/b; if ((a*x*x + b*x +c) == 0) printf("%d is an integer solution", x); else printf("There is no integral solution."); }