There are 21 people in a room. They have to form groups of 3
people each. How many combinations are possible? Write a C
program to print the same.
Answer Posted / jagadeesh
#include<stdio.h>
long int fact(long int n);
void main()
{
long int p;
p=fact(21)/(fact(18)*fact(3));
printf("%ld",p);
}
long int fact(long int n)
{
if(n==0||n==1)
return 1;
else
return n*fact(n-1);
}
Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
How to palindrom string in c language?
write a simple calculator c program to perform addition, subtraction, mul and div.
how to create a 3x3 two dimensional array that will give you the sums on the left and bottom columns
can you use proc sql to manpulate a data set or would u prefer to use proc report ? if so why ? make up an example and explain in detail
how to programme using switch statements and fuctions, a programme that will output two even numbers, two odd numbers and two prime numbers of the users chioce.
Sir... please give some important coding questions asked by product companies..
How do you verify if the two sentences/phrases input is an anagram using predefined functions in string.h and by using arrays?
Write a routine to implement the polymarker function
Write a program to model an exploding firecracker in the xy plane using a particle system
how to test pierrot divisor
To Write a C program to remove the repeated characters in the entered expression or in entered characters(i.e) removing duplicates. String contains only lowercase characters ['a'-'z']
Develop a routine to reflect an object about an arbitrarily selected plane
why nlogn is the lower limit of any sort algorithm?
Given a spherical surface, write bump-mapping procedure to generate the bumpy surface of an orange
Can you send Code for Run Length Encoding Of BMP Image in C Language in linux(i.e Compression and Decompression) ?