-
Notifications
You must be signed in to change notification settings - Fork 0
/
3.18
39 lines (29 loc) · 896 Bytes
/
3.18
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
#include<stdio.h>
int main(void)
{
int hesapno;
float bakiye,topharcama,yenibakiye,topkredi,limit;
printf("Hesap No giriniz(cikis icin -1 e basin):\n");
scanf("%d",&hesapno);
while(hesapno!=-1){
printf("ilk bakiyeyi girin:\n");
scanf("%f",&bakiye);
printf("Toplam harcamalari girin:");
scanf("%f",&topharcama);
printf("Toplam kredileri girin:");
scanf("%f",&topkredi);
printf("Kredi limitini girin: ");
scanf("%f",&limit);
yenibakiye=bakiye+topharcama-topkredi;
printf("yeni bakiye:\t%.2f\n",yenibakiye );
if (yenibakiye > limit )
{printf("limit asildi\n\n");
}
else {
printf("asilmadi\n");}
/*tekrar*/
printf("Hesap No giriniz (cikis icin -1 e basin):\n");
scanf("%d",&hesapno);
}
return 0;
}