#include
#include
#include
#include
void main()
{
int tc,ace,dc;
textcolor(BROWN);
clrscr();
cout<<"\aenter total no. of cards : ";
cin>>tc;
cout<<"\aenter the no. of aces : ";
cin>>ace;
cout<<"\aenter the no. of aces drawn : ";
cin>>dc;
float prob=nCr(ace,dc)/nCr(tc,dc);
cout<<"the probability of drawing "<<<" aces in a pack of "<<<"
is "<
delay(100);
textcolor(RED);
cout<<"\n\n\a";
cprintf("PROGRAM DESIGNED BY:ASHISH KUMAR");
cout<<"\n\n";
cprintf("/ roll 249/06 ");
getch();
}
output:
enter total no. of cards : 52
enter the no. of aces : 4
enter the no. of aces drawn : 2
the probability of drawing 2 aces in a pack of 52 is 0.004525
No comments:
Post a Comment