Browse Source

Added source files

master
Rainer Hihn 4 years ago
parent
commit
075e40cb8f
  1. 30
      strecke.c
  2. 26
      strecke.h

30
strecke.c

@ -0,0 +1,30 @@
/***********************
* Laenge einer Strecke im Raum
*
* Rainer Hihn
*/
#include "strecke.h"
int main(void)
{
/**
* Variablendeklaration
*/
struct point firstPoint;
struct point secondPoint;
struct point thirdPoint;
printf("Entfernung berechnen \n");
/**
* einlesen der 3 Punkte
*/
firstPoint = readPoint();
secondPoint = readPoint();
thirdPoint = readPoint();
printf("Die Flaeche des Dreiecks betraegt %f \n", areaTrinagle(firstPoint, secondPoint, thirdPoint));
return 0;
}

26
strecke.h

@ -0,0 +1,26 @@
/**
* Headerdatei fuer Palindrom
* Funktiondeklarierung
*
* Rainer Hihn
*/
#include <stdio.h>
#include <math.h>
/*
* functions
*/
struct point readPoint();
float distance(struct point point1, struct point point2);
float areaTrinagle(struct point point1, struct point point2, struct point point3);
/*
* structs
*/
struct point
{
float rX;
float rY;
float rZ;
};
Loading…
Cancel
Save