Create JarakManhattan.c
parent
0a3e89be7f
commit
0560dda7ea
|
@ -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));
|
||||||
|
}
|
Loading…
Reference in New Issue