My professor talked about standard deviation for a short time, maybe 8 minutes. So I understand that P(-infy<z<) and P(0 < z < 1.75) gives me the proportion of runners that are slower than her, however I'm confused on what the next step would be from there. Would it be as simple as multiplying...
So "z" would equal .4599, I'm assuming you would multiply it by 405 to get the number of runners who are faster than her. So the answer would be 186 runners?
Homework Statement
Joan’s finishing time for the Bolder Boulder 10K race was 1.75 standard deviations faster than the women’s average for her age group. There were 405 women who ran in her age group. Assuming a normal distribution, how many women ran faster than Joan.
Homework Equations
The...
@Mark44
Errors with this x = S.pop(); error can assign void to char. Any soultions?
string infixToPrefix(string expression)
{ //FINISH ME!
stack<char> S; //holds operators
stack<char>output; //display like in class
string prefix = "";
char ch , x;
int i, j;
i =...
string Cqueue2::remove_nth_member(int n) //for Josephus problem to remove a member
{
string name;
int i;
int index;
int start;
name = Queue[(n - 1) % Size];
start = n%Size;
//we'll be deleteing the soldier at index n%Size
//subtract 1 to account for...
@Mark44 , I'm confused on the void intopre part. The example uses char while my professor wants us to use strings...
For example, I'm trying to find the length of the expression.
cout << "Enter your prefix expression: " << endl;
cin >> expression...
I found a different algo in my book,
Sorry for the odd format, but this one seems more similar to code that my professor wants to produce. The input would be a infix question like cin>> infix
icp and isp are
int isp(char ch){
switch(ch)
{
case '+':
case '-': return 1...
My professor did not explain what op1 and op2 meant... I figured that they were string arrays or maybe option and option 2? I was using the algo that was in my book for the second part.
My professor originally had this:
string prefixToInfix(string expression){
//FINISH ME!
string infix="";
stack<string> S;
string op1,op2,ch;
return infix;
I changed op1 to op1[10] and this is the updated code for prefix to infix
string prefixToInfix(string expression){
//FINISH ME!
string...
Homework Statement
I'm trying to create a infix to prefix converter and prefix to infix converter. I have used a example in my textbook, but it's for a infix to postfix conversion, I figured if I reversed the equation it would give the prefix. Right idea?
2. The attempt at a solution
string...
std::string *newQueue = new std::string[Size - 1];
//Transfer all before removed index, even if index will be 0 then this loop won't fire
for(size_t i = 0; i < index; i++){
newQueue[i] = queue[i];
}
//Transfer all after index, if index will be last element of array this loop won't fire...
I was hoping on using a circle queue:
For example if it counted down by 3 to select the the member of group, 0, 1,2, .Removes the 2rd person and then 3 is the next starting point, 3 ,4,5, removes 5 and then 6 is the new starting point.Eventually it would end up with one element in the queue...