Quick actions

cmd+k|ctrl+k

Navigation

Languages

tmj cadelo belga

Snippet info

Language

C

Visibility

public

Author

alessandrodionisio6

Created

2019-03-01T00:09:34Z

Updated

2019-03-01T00:39:00Z

#include <stdio.h>
#include "funcao.h"

int main(void) {
    float x, y, soma, sub, tot;
    Ponto *a = cria(1.0,1.0);
    Ponto *b = cria(4.0,4.0);
    
    acessa(a, &x, &y);
    printf("Ponto a: %.2f, %.2f \n", x, y);
    
    acessa(b, &x, &y);
    printf("Ponto b: %.2f, %.2f \n", x, y);
    
    somaponto(a, b, &soma);
    printf("a soma eh: %.2f \n", soma);
    
    subponto(a, b, &sub);
    printf("a subtração eh: %.2f \n", sub);
    
    manhattan(a, b, &tot);
    printf("a distancia de manhattan eh: %.2f \n", tot);
    
    
    libera(a);
    libera(b);
    return 0;
}
INFO