Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int a,b,c,valid = 0;
- printf("Enter three sides of triangle : ");
- scanf("%d %d %d", &a, &b, &c);
- if((side1 + side2) > side3)
- {
- if((side2 + side3) > side1)
- {
- if((side1 + side3) > side2)
- {
- valid = 1;
- }
- }
- }
- if(valid == 1)
- {
- printf("Triangle is valid\n");
- }
- else
- {
- printf("Triangle is not valid\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement