Skip to content

Instantly share code, notes, and snippets.

@raziyeaydin
Last active October 5, 2015 05:37
Show Gist options
  • Save raziyeaydin/2757395 to your computer and use it in GitHub Desktop.
Save raziyeaydin/2757395 to your computer and use it in GitHub Desktop.
struct yapısıyla uzaydaki iki ya da üç noktadan yararlanarak oluşacak dikdörtgenin alanını hesaplama
#include<stdio.h>
int main(){
struct point{
int x,y;
};
struct point p1,p2;
int alan;
p1.x=2;
p1.y=6;
p2.x=5;
p2.y=2;
alan=(p1.y-p2.y)*(p2.x-p1.x);
printf("%d",alan);
getch();}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment