For C code: Do not use any function other than getchar, scanf, and printf
Q2.A) Write a program to do the following: Read in two values into variables X and y from the keyboard (they may be decimal values like 2.3). Read in a 3rd value (which is really small < 1.0 ) into variable E. Using a loop find out the value of N in the below expression. i.e. Each iteration of the loop reduced the value of Y by dividing it by 2. Print out N at the end when the condition is met. For most input X and Y values the condition may not become true and the loop would become an infinite loop. To break from such "traps", you can have a loop count and break away. i.e. Count how many iterations it has run through the loop body, and if it goes over some number, say 100, just use "break" after saying "there is no solution for the given numbers" which should end the program.
Note: This program conveys the convergence vs divergence in numerical methods.
(a) Let X = 1.02 Y = 8.1, E = 0.05. In each iteration Y/2N values become 8.1, 4.05, 2.025, 1.0125, and stops since X - 1.0125 is 0.0075 which is < E. This starting Y value converges toward a solution.
(b) If X = 1.02 and Y = 9.5, then it would not converge to a solution to meet the criterion, but diverges away. Y/2N value become 4.75, 2.375, 1.1875, 0.59375, 0.2968,goes to 0, but difference goes up.
In: Computer Science
Iconic memory is a type of memory that holds visual information for about half a second (0.5 seconds). To demonstrate this type of memory, participants were shown three rows of four letters for 50 milliseconds. They were then asked to recall as many letters as possible, with a 0-, 0.5-, or 1.0-second delay before responding. Researchers hypothesized that longer delays would result in poorer recall. The number of letters correctly recalled is given in the table.
| Delay Before Recall | ||
|---|---|---|
| 0 | 0.5 | 1 |
| 6 | 5 | 7 |
| 13 | 2 | 2 |
| 10 | 10 | 5 |
| 7 | 5 | 5 |
| 8 | 8 | 4 |
| 10 | 6 | 1 |
(a) Complete the F-table. (Round your values for MS and F to two decimal places.)
| Source of Variation | SS | df | MS | F |
|---|---|---|---|---|
| Between groups | ||||
| Within groups (error) | ||||
| Total |
(b) Compute Tukey's HSD post hoc test and interpret the results.
(Assume alpha equal to 0.05. Round your answer to two decimal
places.)
The critical value is_______ for each pairwise comparison.
Which of the comparisons had significant differences?
(Select all that apply.)
A.) The null hypothesis of no difference should be retained because none of the pairwise comparisons demonstrate a significant difference.
B.) Recall following no delay was significantly different from recall following a half second delay.
C.) Recall following a half second delay was significantly different from recall following a one second delay.
D.) Recall following no delay was significantly different from recall following a one second delay.
In: Math
|
Ghost, Inc., has no debt outstanding and a total market value of $185,000. Earnings before interest and taxes, EBIT, are projected to be $29,000 if economic conditions are normal. If there is strong expansion in the economy, then EBIT will be 30 percent higher. If there is a recession, then EBIT will be 40 percent lower. The company is considering a $65,000 debt issue with an interest rate of 7 percent. The proceeds will be used to repurchase shares of stock. There are currently 7,400 shares outstanding. Ignore taxes for questions a and b. Assume the company has a market-to-book ratio of 1.0 and the stock price remains constant. a-1. Calculate return on equity (ROE) under each of the three economic scenarios before any debt is issued. a-2. Calculate the percentage changes in ROE when the economy expands or enters a recession. |
|
Assume the firm goes through with the proposed recapitalization. b-1. Calculate the return on equity (ROE) under each of the three economic scenarios. b-2. Calculate the percentage changes in ROE when the economy expands or enters a recession. |
Assume the firm has a tax rate of 21 percent.
c-1. Calculate return on equity (ROE) under each of the three economic scenarios before any debt is issued.
c-2. Calculate the percentage changes in ROE when the economy expands or enters a recession.
c-3. Calculate the return on equity (ROE) under each of the three economic scenarios assuming the firm goes through with the recapitalization.
c-4. Given the recapitalization, calculate the percentage changes in ROE when the economy expands or enters a recession.
In: Finance
Modify the mortgage program to display 3 mortgage loans: 7 years at 5.35%, 15 year at 5.5%, and 30 years at 5.75%. Use an array for the different loans. Display the mortgage payment amount for each loan. Do no use graphical user interface. Insert comments in the program to document the program.
***********Please look at my code so far. Still having trouble with arrays. Want to know if I'm going the right path********
import java.util.Scanner;
public class MortPay2
{
public static void main(String args[])
{
//declaration section
double principal, monthlyPayment;
int choice;
Scanner input = new Scanner(System.in);
int term [] = {84, 180, 360}; //term in
months
double rate [] = {.0044, .0046, .0048};//rate in
decimal format
//display section
System.out.println("Please select from 3 loan
options.");
System.out.println("1. Loan 1: 7 year term at 5.35%
interest.");
System.out.println("2. Loan 2: 15 year term at 5.5%
interest.");
System.out.println("3. Loan 3: 30 year term at 5.75%
interest.");
choice = input.nextInt();
if (choice ==1)
{
System.out.println("You have chosen
Loan 1.");
System.out.println("Please enter
the loan amount: $");
principal = input.nextDouble();
for ( int i = 0; i<3;
i++)
{
monthlyPayment =
principal * rate[0] / (1.0 - Math.pow (rate[0] + 1),
-term[0]));
System.out.println("Total monthly mortgae payment is $%.2f%n",
monthlyPayment);
}
}
}
}
In: Computer Science
Treynor Pie Company is a food company specializing in
high-calorie snack foods. It is seeking to diversify its food
business and lower its risks. It is examining three companies—a
gourmet restaurant chain, a baby food company, and a nutritional
products firm. Each of these companies can be bought at the same
multiple of earnings. The following represents information about
all the companies.
| Company | Correlation with Treynor Pie Company |
Sales ($ millions) |
Expected Earnings ($ millions) |
Standard Deviation in Earnings ($ millions) |
||||||||||
| Treynor Pie Company | + | 1.0 | $ | 148 | $ | 10 | $ | 4.0 | ||||||
| Gourmet restaurant | + | 0.5 | 66 | 6 | 1.2 | |||||||||
| Baby food company | + | 0.4 | 52 | 4 | 1.9 | |||||||||
| Nutritional products company | − | 0.7 | 74 | 5 | 3.1 | |||||||||
a-1. Compute the coefficient of variation for each
of the four companies. (Enter your answers in millions
(e.g., $100,000 should be entered as ".10"). Round your answers to
3 decimal places.)
|
a-2. Which company is the least risky?
Nutritional products company
Treynor Pie Company
Baby food company
Gourmet restaurant
a-3. Which company is the most risky?
Baby food company
Nutritional products company
Treynor Pie Company
Gourmet restaurant
b. Which of the acquisition candidates is most
likely to reduce Treynor Pie Company's risk?
Gourmet restaurant
Nutritional products company
Baby food company
In: Finance
Iconic memory is a type of memory that holds visual information for about half a second (0.5 seconds). To demonstrate this type of memory, participants were shown three rows of four letters for 50 milliseconds. They were then asked to recall as many letters as possible, with a 0-, 0.5-, or 1.0-second delay before responding. Researchers hypothesized that longer delays would result in poorer recall. The number of letters correctly recalled is given in the table.
| Delay Before Recall | ||
|---|---|---|
| 0 | 0.5 | 1 |
| 11 | 6 | 4 |
| 10 | 5 | 3 |
| 7 | 8 | 2 |
| 8 | 5 | 8 |
| 6 | 9 | 2 |
| 12 | 3 | 5 |
(a) Complete the F-table. (Round your values for MS and F to two decimal places.)
| Source of Variation | SS | df | MS | F |
|---|---|---|---|---|
| Between groups | ||||
| Within groups (error) | ||||
| Total |
(b) Compute Tukey's HSD post hoc test and interpret the results.
(Assume alpha equal to 0.05. Round your answer to two decimal
places.)
The critical value is for each pairwise comparison.
Which of the comparisons had significant differences? (Select all
that apply.)
1)Recall following no delay was significantly different from recall following a half second delay.
2)Recall following no delay was significantly different from recall following a one second delay.
3)The null hypothesis of no difference should be retained because none of the pairwise comparisons demonstrate a significant difference.
4)Recall following a half second delay was significantly different from recall following a one second delay.
In: Math
The company is considering the introduction of a new product that is expected to reach sales of $10 million in its first full year and $13 million of sales in the second and third years. Thereafter, annual sales are expected to decline to two-thirds of peak annual sales in the fourth year and one-third of peak sales in the fifth year. No more sales are expected after the fifth year. The CGS is about 60% of the sales revenues in each year. The GS&A expenses are about 23.5% of the sales revenue. Tax on profits is to be paid at a 40% rate. A capital investment of $0.5 million is needed to acquire production equipment. No salvage value is expected at the end of its five-year useful life. This investment is to be fully depreciated on a straight-line basis over five years. In addition, working capital is needed to support the expected sales in an amount equal to 27% of the sales revenue. This working capital investment must be made at the beginning of each year to build up the needed inventory and implement the planned sales program. Furthermore, during the first year of sales activity, a one-time product introductory expense of $200,000 is incurred. Approximately $1.0 million has already been spent promoting and test marketing the new product.
a. Formulate a multiyear income statement to estimate the cash flows throughout its five-year life cycle.
b. Assuming a 20% discount rate, what is the new product’s NPV?
c. Should the company introduce the new product?
In: Finance
|
5. Problem 19.05 (Exchange Rates) The table lists foreign exchange rates for August 25, 2017. On that day, how many dollars would be required to purchase 600 units of each of the following: British pounds, Canadian dollars, EMU euros, Japanese yen, Mexican pesos, and Swedish kronas? Use the direct quotation for your calculations. Round your answers to the nearest cent.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
In: Finance
The table lists foreign exchange rates for August 25, 2017. On that day, how many dollars would be required to purchase 800 units of each of the following: British pounds, Canadian dollars, EMU euros, Japanese yen, Mexican pesos, and Swedish kronas? Use the direct quotation for your calculations. Round your answers to the nearest cent.
| Sample Exchange Rates: Friday, August 25, 2017 | ||
| Direct Quotation: U.S. Dollars Required to Buy One Unit of Foreign Currency (1) |
Indirect Quotation: Number of Units of Foreign Currency per U.S. Dollar (2) |
|
| Australian dollar | $0.7930 | 1.2610 |
| Brazilian real | 0.3160 | 3.1590 |
| British pound | 1.2881 | 0.7763 |
| Canadian dollar | 0.8011 | 1.2483 |
| Chinese yuan | 0.1504 | 6.6482 |
| Danish krone | 0.1603 | 6.2392 |
| EMU euro | 1.1924 | 0.8387 |
| Hungarian forint | 0.00392003 | 255.10 |
| Israeli shekel | 0.2791 | 3.5834 |
| Japanese yen | 0.00914 | 109.36 |
| Mexican peso | 0.0568 | 17.6164 |
| South African rand | 0.0768 | 13.0178 |
| Swedish krona | 0.1255 | 7.9651 |
| Swiss franc | 1.0454 | 0.9566 |
| Venezuelan bolivar fuerte | 0.10014972 | 9.9851 |
| Note: Column 2 equals 1.0 divided by Column 1. However, rounding differences do occur. | ||
| Source: Adapted from The Wall Street Journal (online.wsj.com), August 28, 2017. | ||
| 800 British pounds | = | $ |
| 800 Canadian dollars | = | $ |
| 800 EMU euros | = | $ |
| 800 Japanese yen | = | $ |
| 800 Mexican pesos | = | $ |
| 800 Swedish kronas | = | $ |
In: Finance
You are evaluating the performance of two portfolio managers, and you have gathered annual return data for the past decade:
| Year | Manager X Return (%) | Manager Y Return (%) | |||
| 1 | -2.5 | -4.0 | |||
| 2 | -2.5 | -3.0 | |||
| 3 | -2.5 | -2.5 | |||
| 4 | -0.5 | 3.5 | |||
| 5 | 0.0 | 5.5 | |||
| 6 | 2.0 | 6.5 | |||
| 7 | 6.5 | 7.5 | |||
| 8 | 10.0 | 8.5 | |||
| 9 | 13.5 | 9.5 | |||
| 10 | 19.5 | 12.0 | |||
| Average annual return | Standard deviation of returns | Semi-deviation of returns | |
| Manager X | 4.35 % | 7.74% | ? % |
| Manager Y | 4.35% | 5.67% | ? % |
Sharpe ratio (Manager X): 0.433
Sharpe ratio (Manager Y): 0.591
Sortino ratio (Manager Y): ?
In: Finance