Here is the C++ code for computing the result for b2 -4ac. .It takes input for the variables a,b and c and calculates the result. You all should have in mind how it works exactly. Here is the algorithm.
Steps
User side
1: User asked to enter the values for the variable 'a', 'b' and 'c'
2: Screen shows the calculated result.
Developer side
1: Declare variables that are going to be used in program .
2: Input the values for the variable 'a', 'b' and 'c' from user.
3: Calculate the formula using following statement
x=(b*b)-(4*a*c);
4: Show the value of 'x'.
5: Program ends here.
Code:
Comments
Post a Comment