Bir Sayının Faktöriyelini Bulmak

mustaphos

MB Üyesi
Kayıt
14 Eylül 2015
Mesajlar
35
Tepkiler
8
Yaş
28
Meslek
Öğrenci
Üniv
Anadolu University
Merhaba.
Bu program bir sayının faktöriyelini bulur.
İyi çalışmalar.

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

void main ()

{
float integer,counter,total;
counter = 1;
total = 1;

printf("Please enter an integer : ");
scanf("%f",&integer);

while (counter < integer)

{

counter++;
total *= counter;

}

printf("%.f ! = %.f \n",integer,total);

getch();
}
 
Yukarı Alt