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 / 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 |
What is the function of multilevel pointer in c?
what do structure language means?
Write a program to generate a pulse width frequency of your choise,which can be variable by using the digital port of your processor
write an algorithm to get a sentence and reverse it in the following format: input : I am here opuput: Here Am I note: first letter of every word is capiatlised
What are the benefits of c language?
Rapunzel walks into the forest of forgetfullness. She meets a Lion who lies on Monday Tuesdays and Wednesdays and meets a rabbit who lies on Thurs fridays and saturdays . On that day both say that "I lied yesterday". What day is it .
Does c have enums?
What is string in c language?
What is the size of empty structure in c?
program for following output using for loop? 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5
i want to have a program to read a string and print the frequency of each character and it should work in turbo c
print ur name without using any semicolon in c/c++....
21 Answers Bosch, TCS, Wipro,