summaryrefslogtreecommitdiff
path: root/faktoriyel.c
diff options
context:
space:
mode:
authorb4rkod <void@Asena.localdomain>2024-01-17 21:17:07 +0300
committerb4rkod <void@Asena.localdomain>2024-01-17 21:17:07 +0300
commitb03b61b232c1fa0b9ff1ae607232f8ab3f55ea38 (patch)
tree9169255eae57e59035595768e8dd46cfaba28f50 /faktoriyel.c
parent2fa043277b090a37b3f378a2fefccc57b5bd2814 (diff)
Diffstat (limited to 'faktoriyel.c')
-rw-r--r--faktoriyel.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/faktoriyel.c b/faktoriyel.c
new file mode 100644
index 0000000..bcfaccf
--- /dev/null
+++ b/faktoriyel.c
@@ -0,0 +1,15 @@
+#include <stdio.h>
+
+int main() {
+ int num,snc = 1;
+ printf("faktoriyeli alinacak numarayi giriniz: ");
+ scanf("%d",&num);
+
+ for ( int i = 1; i <= num;i++) {
+ snc = snc * i;
+ }
+
+ printf("%d\n",snc);
+}
+
+