Advertisement
Guest User

Untitled

a guest
Dec 15th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1. 2i
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4. #include <math.h>
  5. int main () {
  6. double a,b,c;
  7. scanf ("%lf%lf%lf" ,&a, &b, &c);
  8. if ((a<=0) || (b<=0) || (c<=0) || (a+b <= c) || (a+c <= b) || (b+c <= a))
  9. {
  10. printf ("Not a triangle\n"); //не треугольник//
  11. }
  12. else if ((a==b) && (a==c) && (b==c))
  13. {
  14. printf ( "Equilateral triangle\n"); //равносторонний//
  15. }
  16. else if ((a==b) || (a==c) || (b==c))
  17. {
  18. printf ( "Isosceles triangle\n"); //равнобедренный//
  19. }
  20. else
  21. {
  22. printf ( "Scalene triangle\n"); //разносторонний//
  23. }
  24. return 0;
  25. }
  26.  
  27. 2K
  28.  
  29. #include <stdio.h>
  30. #include <stdlib.h>
  31. #include <math.h>
  32. int main ()
  33. { double a,b,c,d;
  34. scanf ("%lf%lf%lf%lf" ,&a, &b, &c, &d);
  35. if ((a<=c) & (b<=d))
  36. {
  37. printf ("Yes\n");
  38. }
  39. else
  40. if ((a<=d) & (b<=c))
  41. {
  42. printf ("Yes\n");
  43. }
  44. else
  45. printf ("No\n");
  46. return 0; }
  47.  
  48. 2L
  49. #include <stdio.h>
  50. #include <stdlib.h>
  51. int main ()
  52. {
  53. double a,b,c,x,y;
  54. scanf ("%lf%lf%lf" ,&a, &b, &c);
  55. scanf ("%lf%lf" ,&x, &y);
  56. if ((a<=x) && (b<=y))
  57. {
  58. printf ("Yes\n");
  59. }
  60. else
  61. if ((a<=x) && (c<=y))
  62. {
  63. printf ("Yes\n");
  64. }
  65. else
  66. if ((b<=x) && (c<=y))
  67. {
  68. printf ("Yes\n");
  69. }
  70. else
  71. if ((a<=y) && (b<=x))
  72. {
  73. printf ("Yes\n");
  74. }
  75. else
  76. if ((a<=y) && (c<=x))
  77. {
  78. printf ("Yes\n");
  79. }
  80. else
  81. if ((b<=y) && (c<=x))
  82. {
  83. printf ("Yes\n");
  84. }
  85. else
  86. printf ("No\n");
  87. return 0; }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement