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 |
Predict the output or error(s) for the following: 25. main() { printf("%p",main); }
12344321 123 321 12 21 1 1 how i print this program??
5 Answers DSR Management, Winit,
main() { int x=20,y=35; x = y++ + x++; y = ++y + ++x; printf("%d %d\n",x,y); } what is the output?
write a program to swap two variables a=5 , b= 10 without using third variable
i have to apply for the rbi for the post of officers. i need to know abt the entrance questions whether it may be aps or techinical....
What is the 'named constructor idiom'?
main() { printf(5+"Vidyarthi Computers"); }
# define x=1+4; main() { int x; printf("%d%d",x/2,x/4); }
1.)how to find d most repeated word in a string? string ="how do you do"?? output should be do
1 Answers AAS, Nagarro, Vuram,
What is a #include preprocessor?
Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10
Write a program to print the following series 2 5 11 17 23 31 41 47 59 ...