Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 / jeeva kumar

#include<stdio.h>
#include<conio.h>

void main()
{
clrscr();
int i,n,a,b,c=1,d=1;
printf("Enter the tot no of people");
scanf("%d", &n);
printf("In how many they have to form group");
scanf("%d", &a);
b=a;
for(i=0;i<b;i++)
{
c*=n;
d*=a;
n--;
a--;
}

printf("%d",c/d);
getch();
}

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How arrays can be passed to a user defined function

964


Why isn't any of this standardized in c? Any real program has to do some of these things.

1144


What are the 5 data types?

1047


Explain built-in function?

1086


Are negative numbers true in c?

998


Explain the term printf() and scanf() used in c language?

997


what are the program that using a two dimensional array that list the odd numbers and even numbers separately in a given 10 inputs values

1644


What is malloc and calloc?

1003


What are the differences between Structures and Arrays?

1126


design and implement a data structure and performs the following operation with the help of file (included 1000 student marks in 5 sub. and %also) 1.how many students are fail in all 5 subjects (if >35) 2. delete all student data those are fail in all 5 subjects. 3. update the grace marks (5 no. if exam paper is 100 marks) 4. arrange the student data in ascending order basis of marks. 5.insert double of deleted students with marks in the list.

1922


How can I implement sets or arrays of bits?

987


What would be an example of a structure analogous to structure c?

938


What is the difference between printf and scanf )?

1020


i got 75% in all semester am i eligible for your company

2170


Do pointers take up memory?

1078