#include

int factorial(int);

void main(void) {

int number;

cout > number;

if (number < 0)

cout

int factorial(int);

void main(void) {

int number;

cout > number;

if (number < 0)

cout

#include

int factorial(int);

void main(void) {

int number;

cout > number;

if (number < 0)

cout

int factorial(int);

void main(void) {

int number;

cout > number;

if (number < 0)

cout

#include<iostream.h>void main(void){int n;long int fact(int);cout<<"enter the number whose factorial is to be found:";cin>>n;cout<<"the factorial of"<<n<<"is"<<fact(n)<<endl;}long fact(int num){if(num==0)return 1;elsereturn num*fact(num-1);}

Didn't find the answer you were looking for?