Advertisement
Infra_HDC

xy.c

Apr 23rd, 2019
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.34 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <math.h>
  3. void main() {
  4.         float x,y;
  5.         printf("x: "); scanf("%f",&x);
  6.         printf("y: "); scanf("%f",&y);
  7.         if ((x < 0) && (y < 0)) {
  8.                 x = fabs(x);
  9.                 y = fabs(y);
  10.         }
  11.         printf("\n");
  12.         printf("x = %f\n",x);
  13.         printf("y = %f\n",y);
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement