Community Sites
Create your own community website and start earning today !
It's Free !
Forum
Resources
Mentors
Projects
Entrance Exams
Question Papers
Colleges
Courses
Universities
Schools
Make Money
Communities
Members
Bookmarks
Polls
Fresher Jobs
Strange Photos
Academic Projects
New Member FAQ
My Profile
Sign In
Register
AdSense Revenue
Active Members
Today
eldho
(170)
Anil
(103)
lukky
(72)
Last 7 Days
Saagar
(1818)
sunil
(1772)
satish
(1735)
more...
Awards & Gifts
Online Exams
Aptitude Questions
General Aptitude Tests
Medical Entrance
Engineering Entrance
Bank Tests
TOEFL & IELTS Questions
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.
C++ Program no. probability-7
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. 7 (probability)
#include
#include
#include
#define max 5
void main()
{
textcolor(LIGHTBLUE);
clrscr();
int num;
float b[max],d[max],pdb[max],sum=0;
cout<<"enter the number of machines ";
cin>>num;
for(int i=0;i
{
cout<<"enter the percentage of bolts made by machine "<
cin>>b[i];
cout<<"enter the percentage of defective bolts made by machine
"<
cin>>d[i];
pdb[i]=b[i]*d[i];
sum+=pdb[i];
}
for(i=0;i
{
float p1;
p1=b[i]*d[i]/sum;
cout<<"\nthe probability that defective bolt was made by machine
"<
}
delay(800);
textcolor(RED);
cout<<"\n\n\a";
cprintf("PROGRAM DESIGNED BY:ASHISH KUMAR");
cout<<"\n\n";
cprintf("/ roll 249/06 ");
getch();
}
output:
enter the number of machines 3
enter the percentage of bolts made by machine 1 = 0.25
enter the percentage of defective bolts made by machine 1 = 0.05
enter the percentage of bolts made by machine 2 = 0.35
enter the percentage of defective bolts made by machine 2 = 0.03
enter the percentage of bolts made by machine 3 = .40
enter the percentage of defective bolts made by machine 3 = 0.02
the probability that defective bolt was made by machine 1 = 0.403226
the probability that defective bolt was made by machine 2 = 0.33871
the probability that defective bolt was made by machine 3 = 0.258065
Responses
No responses found. Be the first to respond and make money from
revenue sharing program
.
Feedbacks
Popular Tags
What are tags ?
Search Tags
Sign In
(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- 6
Previous Resource:
C++ Program for probability- 8
Return to Discussion Resource Index
Post New Resource
Category:
Computer & Technology
Post resources and
earn money
!
Related Resources
Verify your site with google Webmaster tools
waterfall model
Blog creation
Autoresponder,introduction to use of autoresponders in online business
Operating System
Watch TV Channels
Watch Asianet online
Kairali TV in Internet
Surya TV online
Amritha TV Channel
Contact Us
Editors
Privacy Policy
Terms Of Use
SpiderWorks Technologies Pvt Ltd. 2006 - 2007 All Rights Reserved.