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


Please Help Members By Posting Answers For Below Questions

How to palindrom string in c language?

9792


write a simple calculator c program to perform addition, subtraction, mul and div.

3384


how to create a 3x3 two dimensional array that will give you the sums on the left and bottom columns

3342


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

2564


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.

2351






Sir... please give some important coding questions asked by product companies..

2021


How do you verify if the two sentences/phrases input is an anagram using predefined functions in string.h and by using arrays?

2254


Write a routine to implement the polymarker function

4581


Write a program to model an exploding firecracker in the xy plane using a particle system

3866


how to test pierrot divisor

2459


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']

729


Develop a routine to reflect an object about an arbitrarily selected plane

3274


why nlogn is the lower limit of any sort algorithm?

2541


Given a spherical surface, write bump-mapping procedure to generate the bumpy surface of an orange

3073


Can you send Code for Run Length Encoding Of BMP Image in C Language in linux(i.e Compression and Decompression) ?

4073