Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- int Ax, Ay, Bx, By, a, b, S;
- printf("Coordinate of point A: ");
- printf("x: ");
- scanf("%d", &Ax);
- printf("y: ");
- scanf("%d", &Ay);
- printf("Coordinate of point B: ");
- printf("x: ");
- scanf("%d", &Bx);
- printf("y: ");
- scanf("%d", &By);
- a = Bx - Ax;
- b = By - Ay;
- S = a * b;
- printf("The area is: %d", S);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement