summaryrefslogtreecommitdiff
path: root/odev.c
diff options
context:
space:
mode:
authorB4rkod <void@Asena.localdomain>2023-11-07 10:48:25 +0300
committerB4rkod <void@Asena.localdomain>2023-11-07 10:48:25 +0300
commit5ad8427e96673042a34ec30eca3eecd3fde95a9d (patch)
treec36e99a9e4f3bfd4a3c4366d2ffd6f3f12d5900b /odev.c
parent1d7b277171576ddaad6fe42bf8d4fc944e65f10b (diff)
test
Diffstat (limited to 'odev.c')
-rw-r--r--odev.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/odev.c b/odev.c
new file mode 100644
index 0000000..a7dbe80
--- /dev/null
+++ b/odev.c
@@ -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 ));
+ }
+
+}