Untitled
unknown
plain_text
2 years ago
1.0 kB
6
Indexable
#include <stdio.h>
#include <math.h>
int main()
{ int a, b, c, largest, x, y;
scanf("%d %d %d", &a, &b, &c);
scanf("%d %d", &x, &y);
if ((a == b) && (b ==c) )
{printf("equal\n");}
else {
largest = a;
if (b > largest)
{largest = b;}
if (c > largest)
{largest = c;}
if (a == b && a > c) {
printf("%d two\n", a);
} else if (a == c && a > b) {
printf("%d two\n", a);
} else if (b == c && b > a) {
printf("%d two\n", b);
}
else printf("%d\n", largest);
}
double distance = sqrt(x * x + y * y);
if (y > 0)
{
if ((distance > 250) && ((abs(x) < 250)&&(abs(y) < 250)))
{
printf("inside\n");
}
else printf("outside\n");
}
else
{
if ((distance < 250) && ((abs(x) < 250)&&((y < x-250) || (y < -x-250))))
{
printf("inside\n");
}
else printf("outside\n");
}
return 0;
}
Editor is loading...