Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <cs50.h>
- int main(void)
- {
- //declare function to check validity of right angled triangle
- bool valid_righttriangle(float x, float y, float z)
- {
- //to check using Pythagoras' Theorem
- if (x*x + y*y = z*z) || (x*x + z*z = y*y) || (y*y + z*z = x*x)
- {
- return true
- }
- return false
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement