[ create a new paste ] login | about

Link: http://codepad.org/Q32Iq4ui    [ raw code | output | fork ]

C, pasted on Oct 12:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <stdio.h>
int main() {
  double x, y;
  printf("x: "); scanf("%lf", &x);
  printf("y: "); scanf("%lf", &y);
  if (x * x + y * y < 1.0)
    printf("in\n");
  else if (x * x + y * y == 1.0)
    printf("on the edge\n");
  else
    printf("out\n");
  return 0;
}
/* end */


Output:
1
x: y: in


Create a new paste based on this one


Comments: