Create JarakManhattan.c

master
MD15 2020-04-10 12:26:43 +07:00 committed by GitHub
parent 0a3e89be7f
commit 0560dda7ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -0,0 +1,8 @@
#include <stdio.h>
#include <math.h>
int main () {
int x1, y1, x2, y2, jarak;
scanf("%d %d %d %d",&x1,&y1,&x2,&y2);
printf("%d\n",abs(x1-x2)+abs(y1-y2));
}