answersLogoWhite

0

#include<stdio.h>

#include<conio.h>

void main()

{

int i,n,fact=1;

clrscr();

printf("enter the number");

scanf("%d",&n);

for(i=1;i<=n;i++)

printf("%d",n);

fact=fact*i;

{

printf("the factorial is=%d",fact);

}

getch();

}

By:-Abhishek Goyal(goyal.abhi40@Yahoo.com)

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

7 Write a C program to compute the factorial of a number using for loop?

int factorial(int n) { int i; int f=1; for(i=2;i&lt;=n;++i) f*=i; return f; }


Write a c program Fibonacci series using for loop in java?

Exactly what do you mean by 'C program in Java'


How do you write a c program to design calculator using loop?

Wr


C program algorithm for simple interest using while loop?

Not used


Write a C-like program fragment that calculate the factorial function for argment 12 with do while loop?

#!/usr/bin/perl print factorial($ARGV[11]); sub factorial { my($num) = @_; if($num == 1) { return 1; # stop at 1, factorial doesn't multiply times zero } else { return $num * factorial($num - 1); # call factorial function recursively } }


Sum three real numbers using for loop in c program?

take input n chodo


Write 8085 assembly language program for BCD up counter and display using 8279?

loop: mvi c,59 dcr c mov a,c daa movc,a jnz loop end


What is odd loop in 'C' program?

odd loop means at least the loop execute once.


How do you find factorial 5 in C programming?

to find the factorial we declare a variable n and initialize its value to 1 initiate a loop for example a for loop and multiply the numbers upto 5 code:- for(i=1,n=1;i&lt;=5;i++) { n=n*i; }


How do you write a C plus plus program that displays a pyramid of Xes on the screen using a for loop?

printf ("x")


C program to find factorial of a no?

this is a code for calculating it recursivelly: float Factorial (float n) { if (n&lt;=1) return 1.0; else return n* Factorial(n-1); }


How do you write a c program to print n no's required using while loop?

int i=0; while (i++&lt;n) { /*...*/ }