diff options
author | b4rkod <void@Asena.localdomain> | 2024-01-17 21:17:07 +0300 |
---|---|---|
committer | b4rkod <void@Asena.localdomain> | 2024-01-17 21:17:07 +0300 |
commit | b03b61b232c1fa0b9ff1ae607232f8ab3f55ea38 (patch) | |
tree | 9169255eae57e59035595768e8dd46cfaba28f50 /odev.c | |
parent | 2fa043277b090a37b3f378a2fefccc57b5bd2814 (diff) |
Diffstat (limited to 'odev.c')
-rw-r--r-- | odev.c | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -0,0 +1,25 @@ +#include <stdio.h> +//alis fiyati, masraf, kar ORANI, iskonto YUZDESI +int main() +{ + int af,mas; + float ko,iy; + printf("Alış fiyatını giriniz:"); + scanf("%d",&af); + printf("Masrafı giriniz:"); + scanf("%d",&mas); + printf("Kar oranını giriniz:"); + scanf("%f",&ko); + printf("iskonto oranını giriniz(opsiyonel):"); + scanf("%f",&iy); + printf("%d %d %.2f %.2f\n", af , mas , ko, iy); + float ns = (((af + mas) + + ((af + mas) * ko))); + printf("tam satış fiyatı= %.2f\n",ns); + if ( iy != 0) + { + printf("indirimli satış fiyat=%.2f\n",ns + - (ns * iy )); + } + +} |