Browse Source

add CustomerData file

remotes/origin/feature/send-money
fdai6618 2 years ago
parent
commit
ea15eb3d0e
  1. 6
      src/CustomerData.txt
  2. BIN
      src/a.exe
  3. 21
      src/sendmoney.c
  4. 3
      src/sendmoney.h

6
src/CustomerData.txt

@ -0,0 +1,6 @@
1234=example
ID=1234
forename=Max
Surname=Mustermann
password=example
balance=23

BIN
src/a.exe

21
src/sendmoney.c

@ -1,13 +1,8 @@
#include "sendmoney.h"
int main()
{
SendMoney();
return 0;
}
// hier wird der Kontozustand zurückgegeben
double getAvailableAccountBalance(double balance)
{
@ -21,7 +16,7 @@ bool checkAccount(int accountNumber)
return (accountNumber >= 1000000 && accountNumber <= 9999999);
}
// hier wird amount zurückgegeben
float getAmount(float amountToSend)
double getAmount(double amountToSend)
{
return amountToSend;
@ -61,14 +56,16 @@ void getReceiverAccountNumber()
void SendMoney()
{
float amountToSend;
double balance = 1000;
double amountToSend;
double length = 21;
int counter = 0;
printf("Bitte geben Sie the Amount:");
scanf("%e", &amountToSend);
float amount = getAmount(amountToSend);
scanf("%lf", &amountToSend);
double amount = getAmount(amountToSend);
int receiverAccountNumber;
float availableAccountBalance = getAvailableAccountBalance(balance);
double availableAccountBalance = getAvailableAccountBalance(length);
printf("%lf", availableAccountBalance);
char tryDifferentAmount;
@ -112,5 +109,5 @@ void initiateMoneyTransfer(float amountToSend)
{
printf("Money transferred \n");
printf("You have succesfully sent %1.f\n ", amountToSend);
printf("You have succesfully sent %lf\n ", amountToSend);
}

3
src/sendmoney.h

@ -7,7 +7,8 @@
bool checkAccount(int accountNumber);
double getAvailableAccountBalance(double balance);
float getAmount(float amountToSend);
double getAmount(double amountToSend);
void getReceiverAccountNumber();
void SendMoney();
void initiateMoneyTransfer(float amountToSend);

Loading…
Cancel
Save