Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- #define DIST(a,b) (a+b)/2
- struct ponto
- {
- int x;
- int y;
- };
- main (void)
- {
- struct ponto posicao;
- //posicao.x=10;
- //posicao.y=22;
- printf("Posicao de x: %d", posicao.x=10);
- printf("\nPosicao de y: %d\n", posicao.y=22);
- //DIST(posicao.x,posicao.y);
- printf("\nDistancia entre x e y: %d\n", DIST(posicao.x,posicao.y));
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement