Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- double trojkat(double podstawa, double ramie){
- if(podstawa == 0 || ramie == 0){
- return 0;
- }
- else if(2*ramie < podstawa ){
- return 0;
- }
- else{
- double wysokosc = sqrt(pow(ramie,2) - pow(podstawa/2,2));
- return podstawa * wysokosc / 2;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement