what is the coding of display the factorial of a number
using array and function?
Answer / balaji ganesh
#include<stdio.h>
int fact(int m)
{
int i,f=1;
for(i=m;i>0;i--)
f=f*m--;
return f;
}
void main()
{
int n,s;
clrscr();
scanf("%d",&n,printf("enter the number:"));
s=fact(n);
printf("factorial of %d is=%d",n,s);
getch();
}
| Is This Answer Correct ? | 6 Yes | 1 No |
What is the size of structure in c?
how many key words availabel in c a) 28 b) 31 c) 32
How to print "I Love My India" without using semi colon?
Explain how are portions of a program disabled in demo versions?
main() { printf("\n %d %d %d",sizeof('3'),sizeof("3"),sizeof(3)); }
What is c programming structure?
write a program to find out number of on bits in a number?
can u give me the good and very optimised code for a car racing game?
/*program to calculate hra,da in salary if salary less than 10000 then hra15%,da13% otherwise hra20%,da18%/*
how to print the character with maximum occurence and print that number of occurence too in a string given ?
How many data structures are there in c?
1.int a=10; 2.int b=20; 3. //write here 4.b=30; Write code at line 3 so that when the value of b is changed variable a should automatically change with same value as b. 5.