Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 2i
- #include <stdio.h>
- #include <stdlib.h>
- #include <math.h>
- int main () {
- double a,b,c;
- scanf ("%lf%lf%lf" ,&a, &b, &c);
- if ((a<=0) || (b<=0) || (c<=0) || (a+b <= c) || (a+c <= b) || (b+c <= a))
- {
- printf ("Not a triangle\n"); //не треугольник//
- }
- else if ((a==b) && (a==c) && (b==c))
- {
- printf ( "Equilateral triangle\n"); //равносторонний//
- }
- else if ((a==b) || (a==c) || (b==c))
- {
- printf ( "Isosceles triangle\n"); //равнобедренный//
- }
- else
- {
- printf ( "Scalene triangle\n"); //разносторонний//
- }
- return 0;
- }
- 2K
- #include <stdio.h>
- #include <stdlib.h>
- #include <math.h>
- int main ()
- { double a,b,c,d;
- scanf ("%lf%lf%lf%lf" ,&a, &b, &c, &d);
- if ((a<=c) & (b<=d))
- {
- printf ("Yes\n");
- }
- else
- if ((a<=d) & (b<=c))
- {
- printf ("Yes\n");
- }
- else
- printf ("No\n");
- return 0; }
- 2L
- #include <stdio.h>
- #include <stdlib.h>
- int main ()
- {
- double a,b,c,x,y;
- scanf ("%lf%lf%lf" ,&a, &b, &c);
- scanf ("%lf%lf" ,&x, &y);
- if ((a<=x) && (b<=y))
- {
- printf ("Yes\n");
- }
- else
- if ((a<=x) && (c<=y))
- {
- printf ("Yes\n");
- }
- else
- if ((b<=x) && (c<=y))
- {
- printf ("Yes\n");
- }
- else
- if ((a<=y) && (b<=x))
- {
- printf ("Yes\n");
- }
- else
- if ((a<=y) && (c<=x))
- {
- printf ("Yes\n");
- }
- else
- if ((b<=y) && (c<=x))
- {
- printf ("Yes\n");
- }
- else
- printf ("No\n");
- return 0; }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement