From d89af5561697b127e8e87aad4e2408ea0b3a890a Mon Sep 17 00:00:00 2001 From: fdai6887 Date: Mon, 6 Feb 2023 21:39:48 +0100 Subject: [PATCH] add Vmultiplier3 --- src/funktion.c | 5 +++++ src/funktion.h | 1 + src/main.c | 10 +++++++++- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/funktion.c b/src/funktion.c index 04c65f4..d080965 100644 --- a/src/funktion.c +++ b/src/funktion.c @@ -165,3 +165,8 @@ float Vmultiplier2(float x2,float m) { double result = x2 * m; return result; } +float Vmultiplier3(float x3,float m) { + x3 = x3 * m; + printf("%f|)\n\n",x3); + return x3; +} diff --git a/src/funktion.h b/src/funktion.h index 4554e21..ab237ea 100644 --- a/src/funktion.h +++ b/src/funktion.h @@ -33,5 +33,6 @@ float Vsubstract2(float x2, float z2); float Vsubstract3(float x3, float z3); float Vmultiplier(float x1,float m); float Vmultiplier2(float x2,float m); +float Vmultiplier3(float x3,float m); #endif diff --git a/src/main.c b/src/main.c index c9fa705..6ca8244 100644 --- a/src/main.c +++ b/src/main.c @@ -139,5 +139,13 @@ int main() x2 = getValue('X'); m = getValue('M'); - Vmultiplier(x2, m); + Vmultiplier2(x2, m); + + printf("z eingeben"); + x3 = getValue('X'); + printf("Vervielfachung\n\n"); + printf("m eingeben"); + m = getValue('M'); + Vmultiplier3(x3, m); + }