Advertisement
fahimkamal63

A. Triangle

Sep 27th, 2019
294
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.73 KB | None | 0 0
  1. A. Triangle
  2.  
  3. Score: 1
  4.  
  5. CPU: 1s
  6. Memory: 1512MB
  7.  
  8.  
  9. Given three side lengths of a triangle. Print whether the triangle is a equilateral triangle (three sides with equal length), isosceles triangle (two sides with equal length) or normal triangle.
  10.  
  11.  
  12. Input
  13. Each input will contain only three integer numbers representing the length of three sides of a triangle. Each side will be less than or equal to 100.
  14.  
  15.  
  16. Output
  17. The output will be “Bad Triangle” for a normal triangle, “Equilateral Triangle” for triangle with three equal length sides and “Isosceles Triangle” for two equal length sides.
  18.  
  19.  
  20. Samples
  21. Input   Output
  22. 1 1 1
  23. Equilateral Triangle
  24. Input   Output
  25. 6 8 10  Bad Triangle
  26. Input   Output
  27. 5 10 5  Isosceles Triangle
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement