Given a positive integer n, write a recursive algorithm that returns the number of the digits in n. For example, if the given number n is 12345, the algorithm should return 5. What is the time complexity of your algorithm?
In: Computer Science
As a supervisor, you have been requested to assist junior employees to develop a career development action plan (CDAP). Highlight the key critical stages useful in preparing the plan.
In: Operations Management
In: Finance
In: Accounting
Fill in the code only using pointer variables
#include
using namespace
std; int main() {
int longside; // holds longside (length)
int wideside; // holds wideside(width)
int total; // holds total (area)
int *longsidePointer = nullpointer; // int pointer which will be set to point to length
int *widthPointer = nullpointer; // int pointer which will be set to point to width
cout << "Please input the longside of the rectangle" << endl;
cin >> longside;
cout << "Please input the wideside of the rectangle" << endl;
cin >> wideside;
// Fill in code to make longsidePointer point to longside(length) (hold its address)
// Fill in code to make widesidePointer point to wideside(width) (hold its address)
total = // Fill in code to find the total(area) by using only the pointer variables
cout << "The total is " << total << endl;
if (// Fill in the condition longside(length) > wideside(width) by using only the pointer variables)
cout << "The longside is greater than the wideside" << endl;
else if (// Fill in the condition of wideside(width) > longside(length) by using only the pointer variables)
cout << "The wideside is greater than the longside" << endl;
else
cout << "The wideside and longside are the same" << endl;
return 0;
}
}
In: Computer Science
The user will input a dollar amount as a floating point number; read it from input using a Scanner and the .nextDouble() method. Convert the number of dollars into a number of whole (integer) cents, e.g., $1.29 = 129 cents. Determine and output the optimal number of quarters, dimes, nickels, and pennies used to make that number of cents.
Ex: if the input is
1.18
The output should be
4 1 1 3
for 4 quarters, 1 dime, 1 nickel, 3 pennies.
Hints
(STARTING CODE)
import java.util.Scanner;
public class Change {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
/* Type your code here. */
}
}
In: Computer Science
Synthesis of Banana Oil: What are the gram components of each distillate? What is the percent yield from the peak area?
2.16 mL Isopentyl alcohol, 2.3 mL glacial acetic acid, and 0.15mL of sulfuric acid was used to form 1.3407 g of "banana oil"
A gas chromatogram revealed that our final product contained 4 peaks. 1. 0.412 @ 9.90458 % area, 2. 1.481 @ 1.30885% area, 3. 1.722 @ 3.14633% area, and 4. 2.040 @ 85.64024% area. How can I calculate the percent yield from each peak area?
In: Chemistry
Example
Critical thinkers make sure they fully understand something before they judge it.
My Application: Instead of criticizing every comment I hear in class, I will give all comments fair consideration.
1. Critical thinkers don't feel they need to be right about everything.
My Application:
2. Critical thinkers make sure they fully understand something before I judge it.
My Application:
3. Critical thinkers demand evidence before they will believe something.
My Application:
4. Critical thinkers are willing to criticize a popular belief if it is the right thing to do.
My Application:
5. Critical thinkers see things in shades of gray rather than in black and white
My Application:
6. Critical thinkers would rather find a solution that benefits everyone than get their own way.
My Application:
In: Operations Management
Your portfolio is contains $11,845 invested in a mutual fund with a beta of 1.3, and $4,740 invested in an ETF with a beta of 0.8. You want to re-balance your portfolio so that it will have an overall beta of 0.8. You plan on selling shares of one asset to buy shares of the other. How many shares of the mutual fund will need to sell (or buy) to achieve your goal? The ETF is trading at $16.40 and the mutual fund is trading at $7.80. Write your answer as positive if you are buying shares of the mutual fund, and write it as negative if you are selling the shares of the fund. Round your answer to one decimal place. Answer:(1,518.6)
In: Finance
Your portfolio is contains $11,385 invested in a mutual fund with a beta of 2.4, and $980 invested in an ETF with a beta of 0.4. How much (in $) should you transfer from the mutual fund to the ETF so that your overall portfolio beta is 0.9? You will not add any money to the portfolio, you are just transferring money from one asset to another.
If re-balancing requires transferring money from the ETF to the mutual fund, write the answer as a negative number.
Answer is 8,294 need to know how to arrive to that number
In: Finance
Given a stack S and an element x, write a recursive algorithm that returns True if x is in S, or False otherwise. Note that your algorithm should not change the content in S. What is the time complexity of your algorithm?
In: Computer Science
Which of the following techniques is used to identify the functions of a particular part of the brain? A. Autopsy B. Computerized Tomography (CT) C. Evoked Potentials D. Electrical Stimulation E. Microdialysis Please choose your answer and explain your choice as indicated by the directions by explaining your thoughts with at least 175 words per entry at minimum to help demonstration elaboration of concepts.
In: Psychology
Jim spends $100 on leisure when he is not exercising. He doesn’t participate in any leisure when he does 25 hours of exercise. He proudly claims that he maximizes his satisfaction by choosing to perform 10 hours of exercise and $60 on leisure.
a) Draw the budget line and illustrate where her indifference curve intersects the budget line. Call this indifference curve Ua.
b) Under a new pricing arrangement, her budget line changes. His income remains the same but the slope is different: she now spends $70 on leisure when he is not exercising and does 70 hours of exercise when she doesn’t participate in any leisure. Although he could still choose to perform 10 hours of exercise and $60 on leisure, he claims that he is better off with 25 hours of exercise and $45 worth of leisure. Draw the updated budget line and illustrate where her indifference curve now intersects the updated budget line. Call this indifference curve Ub.
c) Is Jim's claim that he is better off correct? Use your understanding of revealed preferences and indifference curves to support his claim.
In: Economics
I ALREADY HAVE THE CORRECT ANSWERS. CAN YOU EXPLAIN TO ME HOW AND/OR WHY THESE ARE THE ANSWERS? THANK YOU :)
int a(int &x, int y) { x = y; y = x + 1; return y;
}
int b(int &x, int y) { y = x + 1; x = y; return y;
}
void c(int x, int y) { if (x > 2) return; cout << y; c(x + 1, y - 1);
}
int main() {
int x[2][3] = {{1, 2, 3}, {4, 5, 6}};
int y[3] = {7, 8, 9};
cout << x[1][1] << endl; // line (a)
y[0] = a(y[0], y[1]);
cout << y[0] << y[1] << endl; // line (b)
cout << b(x[0][2], x[1][2]) << endl; // line (c)
cout << x[0][2] << x[1][2] << endl; // line (d)
c(0, 4); cout << endl; // line (e)
}
(a) What is the output from the instruction beginning on line (a)?
Answer: 5
(b) What is the output from the instruction beginning on line (b)?
Answer: 98
(c) What is the output from the instruction beginning on line (c)?
Answer: 4
(d) What is the output from the instruction beginning on line (d)?
Answer: 46
(e) What is the output from the instruction beginning on line (e)?
Answer: 432
In: Computer Science
In: Psychology