Suppose that a perfectly competitive firm is currently producing 100 units of output. If the short-run marginal cost of producing the 100th unit is greater than the price at which that unit can be sold, how must this firm alter its labor input in order to maximize profit
In: Economics
Using the below program as a starting point
C++ Program - Arrays- Chapter 9
Include the following header files in your
program: string, iomanip, iostream
Suggestion: code steps 1 thru 4 then test then add
requirement 5, then test, then add 6, then test etc. Add comments
to display assignment //step 1., //step 2. etc. This program is to
have no programer created functions. Just do everything in main and
make sure you comment each step so I can grade more easily.
C++ Program Pointers
Before starting on this project you should make sure points 1 to 15
are working properly from Chapter 7 Arrays project.
This program is to have no programer created functions.
Just do everything in main and make sure you comment each step so I
can grade more easily.
C++ Program Extension - This will be graded as a separate program
but will add the following to Chapter 7 Arrays project. Don't
forget to include comments with the corresponding number.
Extend the Array
project to include:
16. Define a pointer to a double, pdArray.
17. Assign the pointer, pdArray, to contain the
address of the double array, dArr:
18. Use the array name, dArr, to print out the
array elements with subscript notation, [ ]. All on 1 line a space
between each.
19. Use the pointer to print out the array elements with pointer
notation while not changing the pointer itself. Use a for loop. *(
pdArray + Cnt1) would be an example. All on 1 line
a space between each.
20. Use the pointer to print out the array elements with pointer
notation but change the pointer to point to the actual array
element rather than the method in 18. All on 1 line.
*pdArray would do this if the loop has the
following post loop operation:
pdArray++
21. Use the array name for the double array and pointer notation to
print the entire array, all on one line.
22. Using a different pointer, piArray, allocate
enough memory for 100 int's and assign the address to the
pointer.
23. In a for loop assign every item in the array to be a random
number from 1 to 49 ( hint: rand() % 6 + 1 gives random numbers
from 1 to 6 )
24. Using cout print the first 10 items in the array, all on 1
line.
USE THIS PROGRAM AS STARTING POINT
//Christopher Cupani
//Sept 22, 2019
//Online class
//Chapter 7
#include <iostream>
#include <istream>
#include <string>
#include <iomanip>
#include <cstring>
using namespace std;
int main()
{
//The variables are declare
double dArr[5];
double lArr[7] = { 100000, 134567, 123456, 9, -234567,
-1, 123489 };
int iArr[3][5];
char sName[30] = { 'C','h','r','i','s' };
//define variables cnt1 and cnt2 (short data
types)
short cnt1, cnt2;
long double total = 0;
//define one long variable and it call highest
long highest;
// 4
int i;
//Create a loop to put a random number into each of
the elements
//of the array of double.
srand(time(0));
for (i = 0; i < 5; i++) {
double f = (double)rand() /
RAND_MAX;
dArr[i] = 1 + f * (49);
}
//Create a for loop to display all of the values in
dArr.
for (i = 0; i < 5; i++) {
cout << dArr[i] << "
";
}
cout << endl;
// loop to add up the array of double, dArr, into
the
//variable total
for (i = 0; i < 5; i++) {
total += dArr[i];
}
//display the total
cout << "Total of double array is " <<
total << endl;
//display the average
cout << "Average of double array is " <<
total / 5 << endl;
// Create a for loop that was like example in the
instructions
//to the following for the long array, lArr.
for (cnt1 = 1, highest = lArr[0]; cnt1 < 7;
cnt1++)
{
//logic to compare each array
element, starting with lArr[1], with highest
//replace highest if the value in
lArr[cnt] is higher than the value in variable highest
if (highest < lArr[cnt1])
highest =
lArr[cnt1];
}
//display the highes value
cout << "Highest is " << highest <<
endl;
//generate random number in 2d array between 1 to
53
for (cnt1 = 0; cnt1 < 3; cnt1++)
{
for (cnt2 = 0; cnt2 < 5; cnt2++)
{
iArr[cnt1][cnt2]
= rand() % (53) + 1;
}
}
cout << endl;
//Display the 2 d array with setw(3)
cout << "iArr is " << endl;
for (cnt1 = 0; cnt1 < 3; cnt1++)
{
for (cnt2 = 0; cnt2 < 5; cnt2++)
{
cout <<
setw(3) << iArr[cnt1][cnt2];
}
cout << endl;
}
cout << endl;
//Display 2d array iArry column wise
cout << "iArry print in column wise " <<
endl;
for (cnt1 = 0; cnt1 < 5; cnt1++)
{
for (cnt2 = 0; cnt2 < 3; cnt2++)
{
cout <<
setw(3) << iArr[cnt2][cnt1];
}
cout << endl;
}
cout << endl;
//Use cin.getline( ...... ) to add another name into
variable sName.
cout << "Enter the name " << endl;
cin.getline(sName, 30);
//Display the name
cout << sName << endl;
cnt1 = 0;
//Display the ascii value of each character in the
char array,
//1 per line. Use a while loop to look for the '\0' as
a signal to end.
while (sName[cnt1] != '\0') {
cout << sName[cnt1] <<
" Ascci is " << int(sName[cnt1]) << endl;
cnt1++;
}
//Entering Albert Einstein to sName array and
//using strcpy_s function.
strcpy_s(sName, "Albert Einstein");
cout << sName << endl;
//Display the ascii of 12th character
cout << "12th character ascii value is "
<< int(sName[12]);
return 0;
}
In: Computer Science
A cruise line estimates that it can sell 3,400 tours to Alaska at a price of $900 each, but it will lose 100 sales for each $50 increase in its price. Let p be the price and q the number of tours sold.
(a) Write q as a linear function of p.
(b) Write the revenue R as a function of p and find the marginal revenue with respect to p (i.e., the rate of change of R with respect to p).
(c) Suppose it costs $400 per passenger to operate the tour. Write the cost as a function of the price p and find the marginal cost with respect to p.
(d) Find the marginal profit with respect to p.
(e) The company priced its tour at $1,050 last year. If it increases the price this year, will it increase or decrease its profit? Explain your answer.
(f) Answer the same question and explain your answer if last year’s price was $1,550.
In: Finance
Suppose the inverse demand for a product produced by a single firm is given by P = 200 − 5Q and this firm has a marginal cost of production of MC = 20 + 2Q.
a. If the firm cannot price-discriminate, what is the profit-maximizing price and level of output for this monopolist? What are the levels of producer and consumer surplus in the market? What is the deadweight loss?
b. If the monopolist can practice perfect price discrimination, what output level will it choose? What are the levels of producer and consumer surplus and deadweight loss under perfect price discrimination?
c. Suppose that the monopolist’s marginal cost curve is now MC = 20. If the monopolist cannot perfectly price discriminate but can distinguish between students (with a demand curve of P = 100 − 10Q) and non-students (with a demand curve of P = 300 − 10Q), what will be the price it is charging to students and non-students? What will be the quantity it is selling to students and non-students?
In: Economics
P=50 - 0.25Q, where P is the price (dollars per 100 lbs.), and Q is quantity. Furthermore, assume that cocoa can be produced at a constant marginal and average cost of $10 per unit of Q.
Cocoa producers have formed a cartel, aimed at realizing the monopoly price for cocoa.
Given the demand equation and marginal cost specified above, what is the monopoly price and quantity?
The monopoly sets MC=MR for profit maximization
MR = twice the slope of the demand curve
MR = 50-0.50Q
MC = 10
50-0.50Q = 10
50-10 = 0.50Q
Q = 40/0.50 = 80
P = 50-0.25*80 = 30
In: Economics
Q. The example uses the following data for 2007 :
PG = wholesale price of natural gas ($ per 1000 cubic feet)
PO = average price of a barrel of crude oil = $50,
Production and consumption of natural gas were 23 trillion cubic feet,
Supply of Natural Gas (trillion of cubic feet): QS = 15.90 + 0.72PG + 0.05PO
Demand for Natural Gas (trillion of cubic feet) QD = 0.02 – 1.8 PG + 0.69PO
a. Find the equilibrium price for natural gas
b. Suppose the regulated price of gas were $7.00 per thousand cubic feet instead of $3.00. How much excess demand or supply would there have been?
b. Suppose the market for natural gas remained unregulated. If the price of oil increased from $50 to $100, calculate the cross- price elasticity of natural gas with respect to crude oil.
In: Economics
The following information is available for the employees of Webber Packing Company for the first week of January Year 1:
Assume the Social Security tax rate is 6.0 percent on the first
$110,000 of salaries and the Medicare tax rate is 1.5 percent of
total salaries. The state unemployment tax rate is 5.4 percent and
the federal unemployment tax rate is 0.6 percent of the first
$7,000 of salary for each employee.
c. Prepare the journal entry to record the payment of the payroll for the week. (If no entry is required for a transaction/event, select "No journal entry required" in the first account field. Do not round intermediate calculations. Round your answers to 2 decimal places.)
Journal entry worksheet
Note: Enter debits before credits.
|
In: Accounting
please answer all thequestion :
1-The diastolic blood pressure (in mm Hg) of 84 patients with hypertension was:
88 98 78 84 77 81 90 82 75 72 92 85 92 77 84 77 82 100
92 88 74 80 95 90 87 80 83 77 86 80 88 90 79 82 93 100
80 85 96 85 90 84 82 95 88 97 80 88 94 92 88 96 90 103
88 86 84 90 98 88 86 95 97 88 75 82 90 98 84 97 84 102
88 78 80 82 86 90 85 95 88 86 90 101
Based on this information, construct a frequency distribution in order to answer the following questions.
a. Calculate the range. ........
b. Calculate the value of:
(1) First quartile score. (compute to whole number)
............
(2) Third quartile score. (compute to whole number) ........
(3) 90th percentile score. (compute to the first decimal)
........
(4) Percentile rank of a score of
81............. th
(5) Percentile rank of a score of 87............. th
2-Calculate the value of:
First quartile score. (compute to the first
decimal).........
Third quartile score. (compute to the first decimal).........
90th percentile score. (compute to the second decimal)
.........
Percentile rank of a score of 81.......... th
Percentile rank of a score of 87......... th
3- Calculate the percentage of scores with stays greater than one week............ %
4- Calculate the percentage of scores with stays greater than two weeks......... %
In: Statistics and Probability
2. Consider a bond with the following features: Maturity = 7 years Face value = $1,000 Coupon rate = 4% Semiannual coupons Price = $993
What is this bond's YTM stated as an annual rate?
A 3.2500%
B 4.1161%
C 2.0581%
D 6.500%
3. Maturity (years) = 5 Face Value = $1,000 Coupon Rate = 3.00% Price = $900 Coupon (Annual)
What is the YTM (annual) of the above bond?
A 5.38%
B 5.30%
C 5.33%
D 4.80%
E 5.36%
5. Maturity (years) = 5 Face Value = $1,000 Coupon Rate = 6.00% Current Price = $965 Coupon dates (Semiannual)
What is the YTM (annual) of the above bond?
A 5.95%
B 3.45%
C 6.91%
D 3.42%
E 6.84%
6. Maturity (years) 5 Face Value = $1,000 Coupon Rate = 5.00% Current Price = $1,100 Coupon dates (Annual) Time to call (years) 3 Price if Called $1,050.00
What is the bond's yield to call (YTC) (annual) if the bond is called at its first possible date?
A 1.56%
B 4.55%
C 3.08%
D 3.11%
E 4.59%
7. Maturity (years) 5 Face Value = $1,000 Coupon Rate = 3.00% Current Price = $1,100 Coupon dates (Annual) Time to call (years) 3 Price if Called $1,030.00
What is the bond's yield to call (YTC) (annual) if the bond is called at its first possible date?
A 0.62%
B 2.73%
C -0.31%
D 0.63%
E 2.75%
8. Maturity (years) 9 Face Value = $1,000 Coupon Rate = 5.00% Current Price = $980 Coupon dates (Annual) Time to call (years) 6 Price if Called $1,050
What is the bond's yield to call (YTC) (annual) if the bond is called at its first possible date?
A 6.18%
B 5.40%
C 5.28%
D 6.12%
E 5.73%
In: Finance
A local pizzeria sells 500 large pepperoni pizzas per week at a price of $20 each. Suppose the owner of the pizzeria tells you that the price elasticity of demand for his pizza is -2, and he asks you for advice. He wants to know two things. First, how many pizzas will he sell if he cuts his price by 10%? Second, how will his revenue be affected?
If he cuts his price by 10%, his sales will increase to ___ pizzas, and his total revenue will increase to $___.
In: Economics