Advertisement
Guest User

Untitled

a guest
Oct 15th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #include <cstdlib>
  2. #include<math.h>
  3. #include <iostream>
  4. using namespace std;
  5. int main()
  6. {
  7. system("chcp 1250");
  8. double a;
  9. cout<<"Wzor herona:"<<endl;
  10. cout<<"Podaj pierwszy z bokow:";
  11. cin>>a;
  12. double b;
  13. cout<<"Podaj drugi bok: ";
  14. cin>>b;
  15. double c;
  16. cout<<"Podaj trzeci bok: ";
  17. cin>>c;
  18. double p=(a+b+c)/2;
  19. cout<<sqrt(p*(p-a)*(p-b)*(p-c));
  20.  
  21. system("pause");
  22. return 0;
  23.  
  24.  
  25.  
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement