I am trying to solve this problem : (Write a program to compute - TopicsExpress



          

I am trying to solve this problem : (Write a program to compute the real roots of a quadratic equation (ax + bx + c = 0). The roots can be calculated using the following formulae: x1 = (-b + sqrt(b - 4ac))/2a and x2 = (-b - sqrt(b - 4ac))/2a I wrote the following code, but its not correct: program week7_lab2_a1; var a,b,c,i:integer; x,x1,x2:real; begin write(Enter the value of a :); readln(a); write(Enter the value of b :); readln(b); write(Enter the value of c :); readln(c); do you know why? and taking a=-6,b=7,c=8 .. can you desk- check it after writing the pesudocode?
Posted on: Fri, 12 Sep 2014 14:04:38 +0000

Recently Viewed Topics




© 2015