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