Community Sites
Create your own community website and start earning today !
It's Free !
 
Communities Members BookmarksPolls Fresher Jobs Funny Pictures MCA Projects New Member FAQ  



My Profile
Active Members
TodayLast 7 Days more...



Awards & Gifts
Online Exams

Fresher Jobs


Our fresher job section is exclusively for fresh graduates! Find jobs for freshers in major Indian cities including Bangalore, Chennai, Hyderabad, Pune or Kochi

Resources


Find educational articles, blogs, discussion threads and other resources.

Colleges


Find details about any college in India or search for courses.

website counter




C++ Program no. probability-3


Posted Date: 23 Mar 2008    Resource Type: Articles/Knowledge Sharing    Category: Computer & Technology

Posted By: ashish singh       Member Level: Diamond
Rating:     Points: 3



Program no. 3 (probability)

#include
#include
#include
void main()
{
textcolor(GREEN);
clrscr();
float a1,a2,b1,b2,c1,c2;float p1,p2;
cout<<"enter the odds for 1st critic in the form (x y) : ";
cin>>a1>>a2;
cout<<"enter the odds for 2nd critic in the form (x y) : ";
cin>>b1>>b2;
cout<<"enter the odds for 3rd critic in the form (x y) : ";
cin>>c1>>c2;
cout<<"\ncase 1: when all three review the book ";
p1=((a1/(a1+a2))*(b1/(b1+b2))*(c1/(c1+c2)));
cout<<"\n\aa\nthe probability in this case is "<cout<<"\n\n\acase 2: when any two review the book ";
p2=((a1/(a1+a2))*(b1/(b1+b2))*(c2/(c1+c2)))+((a2/(a1+a2))*(b1/(b1+b2))*(c1/(c1+c2)))+((a1/(a1+a2))*(b2/(b1+b2))*(c1/(c1+c2)));
cout<<"\nthe probability in this case is "<cout<<"\n\a\nbut required probability is sum of two probabilities that
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 the odds for 1st critic in the form (x y) : 5 2
enter the odds for 2nd critic in the form (x y) : 4 3
enter the odds for 3rd critic in the form (x y) : 3 4

case 1: when all three review the book
the probability in this case is 0.174927

case 2: when any two review the book
the probability in this case is 0.434402

but required probability is sum of two probabilities that is 0.609329




Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: C++ Program for probability- 2
Previous Resource: C++ Program for probability- 4
Return to Discussion Resource Index
Post New Resource
Category: Computer & Technology


Post resources and earn money!
 
Related Resources



Watch TV Channels
  • Watch Asianet TV online
  • Kairali TV in Internet
  • Surya TV online
  • Amritha TV Channel

  • Contact Us    Privacy Policy    Terms Of Use   

    SpiderWorks Technologies Pvt Ltd. 2006 - 2007 All Rights Reserved.