Advertisement
Uncleeee

Untitled

Mar 6th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. #include <iostream>
  2. #include <math.h>
  3.  
  4. using namespace std;
  5.  
  6. class Urav {
  7. private:
  8. int kefa;
  9. int kefb;
  10. int kefc;
  11. public:
  12. Urav (int a, int b, int c):kefa(a), kefb(b), kefc(c)
  13. {}
  14. int sum() {
  15. return kefb*kefb-4*kefa*kefc;
  16. }
  17.  
  18.  
  19. };
  20.  
  21. int main(){
  22. int a,b,c;
  23. cin >> a; cin >> b; cin >> c;
  24. cout << "D = ";
  25. Urav n1(a,b,c);
  26. cout << n1.sum()<<endl;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement