Triangle
Lesson 7 of 32 in Coddy's Coding Problems course.
Create a program that will calculate for given three sides if it's possible to create a triangle using them.
Challenge
EasyWrite a program that gets three natural numbers A, B, C from input and outputs whether a triangle can be made with sides that have lengths A, B and C. If yes outputs "YES", otherwise, outputs "NO"
Input
2 3 4
Output
YES
Input
3 4 9
Output
NO
Note: The input is string!
Try it yourself
#include <stdio.h>
int main() {
// Write code here
return 0;
}
All lessons in Coding Problems
1Course Introduction
Introduction2Easy Difficulty
SumEven or OddSquare & CubeMonthsMiddle digitTriangleMathematicsSum to NSum of numbersSortingCircle