Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main() {
- int X0, Y0, X1, Y1, P, Z;
- scanf("%d %d %d %d %d", &X0, &Y0, &X1, &Y1, &P);
- Z = ((X1 - X0) + (Y1 - Y0)) / P;
- printf("O sapo precisa de %d pulos para chegar em %d,%d partindo de %d,%d.\n", Z, X1, Y1, X0, Y0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement