Kullanıcıdan girilen sayının faktoriyelini alan C programı

06:51 0 Comments

#include <stdio.h>
#include <conio.h>

void main() {

// asal sayı hesaplama programı

int sayi;
int carpim = 1;
printf("Lürfen bir sayı giriniz");
scanf_s("%d", &sayi);

for (int i = 1; i <= sayi; i++){

carpim = carpim*i;

}


printf("%d sayisinin faktoriyeli %d ", sayi, carpim);

_getch();

}

erdem

Some say he’s half man half fish, others say he’s more of a seventy/thirty split. Either way he’s a fishy bastard. Google

0 yorum: