-
Notifications
You must be signed in to change notification settings - Fork 0
/
3.17.c
41 lines (33 loc) · 978 Bytes
/
3.17.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#include <stdio.h>
#include <stdbool.h>
int main()
{
double hesapno, basPara, topHarcama, topYatan, krediLimit, yeniBalans;
while(true)
{
printf("\nHesap numarasini girin : (bitirmek icin -1)");
scanf("%lf", &hesapno);
if (hesapno == -1)
return 0;
else {
printf("Baslangic balansini girin:\n");
scanf("%lf", &basPara);
printf("Toplam Harcamayi girin:\n");
scanf("%lf", &topHarcama);
printf("Toplam yatirilan parayi girin:\n");
scanf("%lf,", &topYatan);
printf("Kredi limitini girin:\n");
scanf("%lf", &krediLimit);
yeniBalans = basPara + topHarcama - topYatan;
if(yeniBalans > krediLimit)
{
printf("Hesap:\t\t%.2lf\n", hesapno);
printf("Kredi Limiti:\t%.2lf\n", krediLimit);
printf("Balans:\t\t%.2lf\n", yeniBalans);
printf("Kredi Limiti Asimi!!!");
}
else { printf("Limit Asilmamistir!!");
} } }
scanf("");
return 0;
}