From fbff3158cdd02457cded9d5e271b533ecc8a950d Mon Sep 17 00:00:00 2001 From: fdai6887 Date: Mon, 6 Feb 2023 21:20:30 +0100 Subject: [PATCH] add Vsubstract3 --- src/funktion.c | 6 ++++++ src/funktion.h | 1 + src/main.c | 6 ++++++ 3 files changed, 13 insertions(+) diff --git a/src/funktion.c b/src/funktion.c index 34eb7e6..e1c1f3a 100644 --- a/src/funktion.c +++ b/src/funktion.c @@ -153,3 +153,9 @@ float Vsubstract2(float x2, float z2) { double result = x2 - z2; return result; } +float Vsubstract3(float x3, float z3){ + float X3; + X3 = x3 - z3; + printf("(%f: \n",X3); + return X3; +} diff --git a/src/funktion.h b/src/funktion.h index 28391b8..d13ad49 100644 --- a/src/funktion.h +++ b/src/funktion.h @@ -30,5 +30,6 @@ float Vaddx2(float x2, float z2); float Vaddx3(float x3, float z3); float Vsubstract(float x1, float z1); float Vsubstract2(float x2, float z2); +float Vsubstract3(float x3, float z3); #endif diff --git a/src/main.c b/src/main.c index bdea6d4..9b79fb8 100644 --- a/src/main.c +++ b/src/main.c @@ -128,4 +128,10 @@ int main() x2 = getValue('X'); z2 = getValue('z'); Vsubstract2(x2, z2); + + printf("z eingeben"); + x3 = getValue('X'); + printf("c eingeben"); + z3 = getValue('z'); + Vsubstract3(x3, z3); }