Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <math.h>
- float D = 81.0,
- a = 2,
- b = 8,
- c = 0,
- res = 0.2;
- ////////////////////////////////////////////////////
- int main() //
- {
- D = (b*b) - (4*a*c);
- if(D < 0)
- {
- printf("D = %.2f (less than zero) \n", D);
- printf("No solution ! \n");
- return 0;
- }
- res = sqrt(D);
- printf("sqrt %.2f = %.2f", D, res);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement