Answer:
Explanation:
#include <iostream>
using namespace std;
int main ()
{
int responses[30],count[6];
int score = 0;
string resp = " ";
for (int i = 0; i < 30; i++)
{
responses[i] = 0;
}
for (int i = 0; i < 6; i++)
{
count[i,1]=0;
count[i,2]=0;
count[i,0]=0;
}
while ((resp != "Y") && (resp != "y"))
{
for (int i = 0; i < 30; i++)
{
while ((score > 5) || (score < 1))
{
cout << "Student " << (i+1)<< " please enter a value (1-5):";
cin >> score;
}
responses[i] = score;
if((score > 5)||(score<1))
{
if(score==1) count[1]++;
if(score==2) count[2]++;
if(score==3) count[3]++;
if(score==4) count[4]++;
if(score==5) count[5]++;
}
score = 0;
}
cout<< "Response Frequency Percentage"<<endl;;
cout<< " 1 "<<count[1]<<" "<<(count[1]/30)<<"%"<<endl;
cout<< " 2 "<<count[2]<<" "<<(count[2]/30)<<"%"<<endl;
cout<< " 3 "<<count[3]<<" "<<(count[3]/30)<<"%"<<endl;
cout<< " 4 "<<count[4]<<" "<<(count[4]/30)<<"%"<<endl;
cout<< " 5 "<<count[5]<<" "<<(count[5]/30)<<"%"<<endl;
cout<< "Do you want to exit? Press Y to exit any other key to continue: ";
cin>> resp;
}
return 0;
}
Answer:
1. 45
2. 9
3. 11
4. 17
Explanation:
Given the following:
28 checked H
26 checked C
14 checked D
8 checked H and C
4 checked H and D
3 checked C and D
2 checked all.
Hence N(H) = 28
N(C) = 26
N(D) = 14
N(H U C) = 8
N(H U D) = 4
N(C U D) = 3
N(H U C U D) = 2
We also know that
Total = N(H) + N(C) + N(D) - N(H U C) - N(H U D) - N(C U D) + N(H U C U D)
Substituting the given values, we obtain
Total = 55
1. Students that didn't check any box = 100 - 55 = 45 students
2. Students who checked exactly two box
= N(H U C) + N(H U D) + N(C U D) - 3N(H U C U D) (from probability theorem)
Substituting the values, we have 8 + 4 + 3 - 6 = 9 students
3. Students who checked atleast two box =
The people who have checked all three are needed to be calculated once. Earlier, we subtracted them thrice so we add one time
N(H U C) + N(H U D) + N(C U D) - 2N(H U C U D) = 8 + 4 + 3 - 4 = 11 students
4. Given N(C) = 26
We subtract N(CUD) and N(HUC) as they have checked another apart from club.
26 -8 - 3 = 15
Now we could notice we have subtracted N(HUCUD) twice in both categories, so we add one time to neutralise
15 + 2 = 17
Hence N(only C) = 17 students.
Answer: 'Scope' Is <u>NOT</u> a basic programming sturtcure
Explanation: Surprisingly, it can often be broken down into <u>three simple programming structures called sequences, selections, and loops</u>. ... These come together to form the most basic instructions and algorithms for all types of software.
System operations of the website u are asking to access
Nondirect competition is the variance between vendors whose products or services are not the same but that could gratify the consumer need
Lets take exampl of microsoft corporation
The indirect competitors are WHOLE FOODS and WAL-MART
Direct competitors sells the product or services that are same
the direct competitors are Apple, Google, HP, IBM
hope it helps