|
@ -1,5 +1,12 @@ |
|
|
#include "sendmoney.h" |
|
|
#include "sendmoney.h" |
|
|
|
|
|
|
|
|
|
|
|
int main() |
|
|
|
|
|
{ |
|
|
|
|
|
SendMoney(); |
|
|
|
|
|
|
|
|
|
|
|
return 0; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// hier wird der Kontozustand zurückgegeben |
|
|
// hier wird der Kontozustand zurückgegeben |
|
|
double getAvailableAccountBalance(double balance) |
|
|
double getAvailableAccountBalance(double balance) |
|
|
{ |
|
|
{ |
|
@ -46,7 +53,7 @@ void getReceiverAccountNumber() |
|
|
|
|
|
|
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|
printf("KontoNummer Gültig"); |
|
|
|
|
|
|
|
|
printf("KontoNummer Gueltig"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -56,6 +63,7 @@ void SendMoney() |
|
|
|
|
|
|
|
|
float amountToSend; |
|
|
float amountToSend; |
|
|
double balance = 1000; |
|
|
double balance = 1000; |
|
|
|
|
|
int counter = 0; |
|
|
printf("Bitte geben Sie the Amount:"); |
|
|
printf("Bitte geben Sie the Amount:"); |
|
|
scanf("%e", &amountToSend); |
|
|
scanf("%e", &amountToSend); |
|
|
float amount = getAmount(amountToSend); |
|
|
float amount = getAmount(amountToSend); |
|
@ -84,14 +92,22 @@ void SendMoney() |
|
|
|
|
|
|
|
|
scanf("%s", &tryDifferentAmount); |
|
|
scanf("%s", &tryDifferentAmount); |
|
|
|
|
|
|
|
|
if (tryDifferentAmount == 'Y' || tryDifferentAmount == 'y') |
|
|
|
|
|
|
|
|
while ((tryDifferentAmount == 'Y' || tryDifferentAmount == 'y') && counter <= 2) |
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
printf("Bitte geben Sie einen Gueltigen Amount:\n"); |
|
|
|
|
|
scanf("%d", &amountToSend); |
|
|
|
|
|
counter++; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* if (tryDifferentAmount == 'Y' || tryDifferentAmount == 'y') |
|
|
{ |
|
|
{ |
|
|
amount = getAmount(amountToSend); |
|
|
amount = getAmount(amountToSend); |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|
printf("Fehler"); |
|
|
printf("Fehler"); |
|
|
} |
|
|
|
|
|
|
|
|
}*/ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |