factorial of a given number in c
C
//Factorial of a given number
#include <stdio.h>
//This function returns factorial of the number passed to it
long int factorialOf(int number){
long int factorial = 1;
while(number){
factorial*=number;
number-=1;
}
return factorial;
}
int main(void) {
int n;
printf("Find factorial of \n");
scanf("%d",&n);
printf("\nThe factorial of %d is %ld",n,factorialOf(n));
return 0;
}
Also in C:
- Title
- c program to find the sum of given number using recursion
- Category
- C
- Title
- 'int' is not a subtype of type 'double' dart
- Category
- C
- Title
- ModuleNotFoundError: No module named 'cv2'
- Category
- C
- Title
- how to pass an array value to a pthread in c
- Category
- C
- Title
- assert() in c
- Category
- C
- Title
- append to list in c
- Category
- C
- Title
- how to put a struct in another struct C
- Category
- C
- Title
- what is stdin in c
- Category
- C
- Title
- vbl share price
- Category
- C
- Title
- es par
- Category
- C
- Title
- duplicar cadena
- Category
- C
- Title
- simpy process return value
- Category
- C
- Title
- resto de division recursiva
- Category
- C
- Title
- too few arguments to function in c
- Category
- C
- Title
- how to open chrome using cmd
- Category
- C
- Title
- c program to count duplicates in an array
- Category
- C
- Title
- pasar a binario recursivo
- Category
- C
- Title
- is c and c++ platform independent
- Category
- C
- Title
- prime number
- Category
- C
- Title
- long commands makes terminal lag after modifying PS1
- Category
- C
- Title
- sbatch array set max jobs at once
- Category
- C
- Title
- pangram program in c
- Category
- C
- Title
- stack implementation
- Category
- C
- Title
- read a binary file c
- Category
- C
- Title
- pointer parameter where to put the asterix in C?
- Category
- C
- Title
- inurl:fiu.edu math faculty
- Category
- C
- Title
- read a document in c getting name from console
- Category
- C
- Title
- write a binary file c
- Category
- C
- Title
- incompatible types when initializing type ‘float’ using type ‘point {aka struct point}’
- Category
- C
- Title
- lazer codechef
- Category
- C
- Title
- c print hello world
- Category
- C
- Title
- what is a long long int in c
- Category
- C
- Title
- does strcat null terminate
- Category
- C
- Title
- xmlns='' was not expected
- Category
- C
- Title
- how to check the size of a file c
- Category
- C
- Title
- curl post request
- Category
- C
- Title
- casting in c
- Category
- C
- Title
- hello world
- Category
- C
- Title
- Docker error Error response from daemon: conflict: unable to remove repository reference
- Category
- C
- Title
- atoi
- Category
- C
- Title
- remove an element from a set
- Category
- C
- Title
- how to print the address of a pointer in c
- Category
- C
- Title
- diagonales
- Category
- C
- Title
- coin row problem in linear time
- Category
- C
- Title
- char to int c
- Category
- C
- Title
- read from stdin c
- Category
- C
- Title
- matplotlib pyplot legend location
- Category
- C
- Title
- declare integer c
- Category
- C
- Title
- 1 212 32123 4321234 543212345 in c
- Category
- C
- Title
- -> operator
- Category
- C
- Title
- pass the pointer in C
- Category
- C
- Title
- how to put a char into a string c
- Category
- C
- Title
- where is my vimrc
- Category
- C
- Title
- how to get random numbers in c
- Category
- C
- Title
- '&&' within '||'
- Category
- C
- Title
- Gemfile.lock`. It is likely that you need to grant write permissions for that path.
- Category
- C
- Title
- where is /dev/kvm
- Category
- C
- Title
- command line arguments c
- Category
- C
- Title
- fibonacci in c
- Category
- C
- Title
- binary tree geekd for geeks
- Category
- C
- Title
- how to globally initlailize a struct
- Category
- C
- Title
- bubble sort time complexity
- Category
- C
- Title
- typedef vs #define
- Category
- C
- Title
- how to store a user input with spaces in c
- Category
- C
- Title
- how to use a pointer as a parameter in c
- Category
- C
- Title
- c check if char is number
- Category
- C
- Title
- Difference between ** and *
- Category
- C
- Title
- random en c
- Category
- C
- Title
- select all file from date powershell
- Category
- C
- Title
- #include<stdlib.h>
- Category
- C
- Title
- azure storage emulator config
- Category
- C
- Title
- disable gnu++11 option
- Category
- C
- Title
- printf in c
- Category
- C
- Title
- CL/cl.h: No such file or directory
- Category
- C
- Title
- mitch mcconnell
- Category
- C
- Title
- add border to image android
- Category
- C
- Title
- what is restrict keyword in c
- Category
- C
- Title
- how to do matrix multiplication in c
- Category
- C
- Title
- restapi
- Category
- C
- Title
- declare character array statically?
- Category
- C
- Title
- ModuleNotFoundError: No module named 'easydict'
- Category
- C
- Title
- lelcetric fied
- Category
- C
- Title
- es vocal
- Category
- C
- Title
- function in c
- Category
- C
- Title
- generate all permutations of string
- Category
- C
- Title
- function pointer c
- Category
- C
- Title
- can we write a program without main in c
- Category
- C
- Title
- insertion sort
- Category
- C
- Title
- arduino digital input pins
- Category
- C
- Title
- get regedit value cmd
- Category
- C
- Title
- Fibonacci program c pthread
- Category
- C
- Title
- reverse function in c
- Category
- C
- Title
- arduino digital io pins
- Category
- C
- Title
- code wars responsable drinker
- Category
- C
- Title
- strrev in c
- Category
- C
- Title
- slurm array job
- Category
- C
- Title
- matplotlib plot circle marker
- Category
- C
- Title
- múltiplos entre dos numeros en c
- Category
- C
- Title
- strtok
- Category
- C
- Title
- first person view unity
- Category
- C