Questions
Write a C program that asks the user to enter double values (the values can be...

Write a C program that asks the user to enter double values (the values can be positive, zero, or negative). After entering the first double value, the program asks "Would you like to enter another value?", and if the user enters Y or y, the program continues to get additional values and stores these values into a double array (for up to 100 values — use a symbolic #define constant to specify the 100 size limit). The program will need to keep track of how many values have been entered into the array. Then the program will determine the largest value entered and display that value. To determine the largest value, pass both the array and the count of how many values were entered to a function named double max(double values[], int numValues). The second parameter of the function indicates the actual number of values stored in the array. The function will then use a loop to determine the largest value. When the function returns to main, the program should display the largest value (i.e., the print should be in main).

In: Computer Science

In this program, you'll create a program that utilizes an enumerated data type to manipulate the...

In this program, you'll create a program that utilizes an enumerated data type to manipulate the array.  

Here are the requirements:

Write a program that contains an enumerated data type named Letters.    In the declaration, include the following three enumerators: ALPHA, BETA, DELTA.

Then, create an array of integers three elements long. The array should be initialized to 0 using a 1-element initialization list.

Instead of using integers as subscripts, use the enumerators from your enumerated data type to assign the values 100, 40, and 75 to the first three elements, respectively.

Finally, print the contents of the array using a for loop that initializes the counter with an enumerator and uses an enumerator in the test expression.

Again, this will be structured as a guided multiple choice quiz where you will choose the appropriate code for a program. After you have gotten a perfect score, write out the program and compile and run it to see it in action.

Instructions:

Choose the correct C++ code for each requirement presented.

Sample Run:

100
40
75

In: Computer Science

Write a program that will calculate and display the cost of a gasoline purchase based on...

Write a program that will calculate and display the cost of a gasoline purchase based on the brand of gasoline, the octane rating and the amount purchased.

Your program should first display a menu prompting the user for the brand of gasoline.  Next prompt the user for the amount of gasoline in liters.

Finally, your program should calculate and display the cost of the gasoline purchase using the formula below.

  • Cost of Discount Gasoline = ($2.49 - (100 - Octane Rating) * 0.01) * Number of Gallons
  • Cost of Premium Gasoline = ($2.99 - (100 - Octane Rating) * 0.01) * Number of Gallons

Notice that the units of measure for the amount of gasoline in the formula are in gallons (not liters).  You will need to convert liters into gallons using this conversion factor: 1 liter = 0.264172 gallons

Sample Input and Output (output should match exactly, including decimal scale)

CPCC Gasoline Services

  1. Discount
  2. Premium

Enter the brand type: 2

Enter the octane rating: 90

Enter the amount of gasoline in liters: 68.04

The cost of the gasoline is $51.95

In: Computer Science

Fill in the blanks in the table below (show solutions) Trucks Labor Total Product (TP) APL...

  1. Fill in the blanks in the table below (show solutions)

Trucks

Labor

Total Product (TP)

APL

MPL

2

0

0

---

---

2

1

75

2

2

100

2

3

100

2

4

380

2

5

50

2

6

75

Is this a short-run or a long-run production process? Briefly explain.

At what point does diminishing returns set in? Specifically in the context of this problem, why is there DMR?

  1. Is it possible that diminishing marginal returns will set in after the very first unit of labor is employed? Illustrate the total product (TPL), marginal product (MPL), and average product (APL) in this case. Explain the shape of your graphs.
  2. If the TPL curve is a straight line through the origin, what do the APL and MPL curves look like? Illustrate. Would the TPL curve ever have this shape? Why or why not?
  3. Which is more relevant to the firm when making decisions, the average product or the marginal product of a new hire? Explain.

In: Economics

Microeconomics Answer all Questions Table 1 Price Quantity Demanded Quantity Supplied $10 10 60 $8 20...

Microeconomics

Answer all Questions

Table 1

Price

Quantity Demanded

Quantity Supplied

$10

10

60

$8

20

45

$6

30

30

$4

40

15

$2

50

0

1   Refer to Table 1. The equilibrium price and quantity, respectively, are

a.

$2 and 50.

b.

$6 and 30.

c.

$6 and 60.

d.

$12 and 30.

2. .   Refer to Table 1. If the price were $8, a

a.

shortage of 20 units would exist and price would tend to rise.

b.

surplus of 25 units would exist and price would tend to fall.

c.

shortage of 25 units would exist and price would tend to rise.

d.

surplus of 45 units would exist and price would tend to fall.

3.     Refer to Table 1 If the price were $4, a

a.

surplus of 15 units would exist and price would tend to fall.

b.

shortage of 25 units would exist and price would tend to rise.

c.

surplus of 25 units would exist and price would tend to fall.

d.

shortage of 40 units would exist and price would tend to rise.

Table 2

A country club usually only allows members to purchase tickets for its celebrity golf tournament, but the club is considering allowing non-members to purchase tickets this year. The demand and supplyschedules are as follows:

Price

Quantity Demanded by Members

Quantity Demanded by Non-members

Quantity Supplied

$10

1000

500

600

$15

800

400

600

$20

600

300

600

$25

400

200

600

$30

200

100

600

4.     Refer to Table 2. If only members are allowed to purchase tickets to this year's celebrity golf tournament, then what will be the equilibrium price?

a.

$10

b.

$15

c.

$20

d.

$25

5.     Refer to Table 2 If both members and non-members are allowed to purchase tickets to this year's celebrity golf tournament, then what will be the equilibrium price?

a.

$10

b.

$15

c.

$20

d.

$25

In: Economics

Table 1 Price Quantity Demanded Quantity Supplied $10 10 60 $8 20 45 $6 30 30...

Table 1

Price

Quantity Demanded

Quantity Supplied

$10

10

60

$8

20

45

$6

30

30

$4

40

15

$2

50

0

1   Refer to Table 1. The equilibrium price and quantity, respectively, are

a.

$2 and 50.

b.

$6 and 30.

c.

$6 and 60.

d.

$12 and 30.

2. .   Refer to Table 1. If the price were $8, a

a.

shortage of 20 units would exist and price would tend to rise.

b.

surplus of 25 units would exist and price would tend to fall.

c.

shortage of 25 units would exist and price would tend to rise.

d.

surplus of 45 units would exist and price would tend to fall.

3.     Refer to Table 1 If the price were $4, a

a.

surplus of 15 units would exist and price would tend to fall.

b.

shortage of 25 units would exist and price would tend to rise.

c.

surplus of 25 units would exist and price would tend to fall.

d.

shortage of 40 units would exist and price would tend to rise.

Table 2

A country club usually only allows members to purchase tickets for its celebrity golf tournament, but the club is considering allowing non-members to purchase tickets this year. The demand and supply schedules are as follows:

Price

Quantity Demanded by Members

Quantity Demanded by Non-members

Quantity Supplied

$10

1000

500

600

$15

800

400

600

$20

600

300

600

$25

400

200

600

$30

200

100

600

4.     Refer to Table 2. If only members are allowed to purchase tickets to this year's celebrity golf tournament, then what will be the equilibrium price?

a.

$10

b.

$15

c.

$20

d.

$25

5.     Refer to Table 2 If both members and non-members are allowed to purchase tickets to this year's celebrity golf tournament, then what will be the equilibrium price?

a.

$10

b.

$15

c.

$20

d.

$25

In: Economics

Compare the monopoly firm to competitive firm in all of their aspects. Given the following demand...

  1. Compare the monopoly firm to competitive firm in all of their aspects.
  1. Given the following demand function of shoes facing Ahmad's company

Q = 1,500 - 200P

Where Q is quantity sales of shoes and P is price.

A. How many shoes could Ahmad sell at $4.50 each?

B. What price would Ahmad's company have to charge to sell 900 shoes?

C. At what price would shoes sales equal zero?

  1. Find the equilibrium price and equilibrium quantity from the following relations describes demand and supply conditions in a given industry.

QD = 80000 –20000P             (Demand)

QS = -20000 + 20000P           (Supply)

Where Q is quantity and P is price in dollars.

  1. Calculate the midpoint price elasticity of demand using the price of $5 and $7. The demand function is:

Q = 1,500 - 200P

Where Q is quantity demanded and P is price.

  1. A new company estimates fixed costs for its product of $50,000 per year and average variable costs of:

AVC=$0.5+$0.0025Q,

Where AVC is average variable cost (in dollars) and Q is output.

Calculate total cost and average total cost for the projected first-year volume of 20,000 units.

  1. Calculate profit from the following demand and total cost functions at output level of 160 units:

Q = 448 - 16P

TC = 1000 + 5 Q

In: Economics

What data type will Python pick for the following variable? radio = '101.5' A. integer (i.e....

What data type will Python pick for the following variable?

radio = '101.5'

A.

integer (i.e. int)

B.

string (i.e. str)

C.

floating point number (i.e. float)

D.

list

Which of the following Python statements changes the first element of a tuple my_tuple to 17?

A.

my_tuple[0] = 17

B.

my_tuple[0] == 17

C.

both (A) and (B)

D.

none of the above

Suppose there are two sections of CSC121 and each section has 10 students. Their midterm exam scores are stored in two lists score_list1 and score_list2. Which of the following Python program fragments displays all these midterm exam scores?

A.
combined_list = [score_list1, score_list2]
for element in combined_list:
    for score in element:
        print (score)
B.
combined_list = score_list1 + score_list2
for element in combined_list:
    print (element)
C.

both (A) and (B)

D.

none of the above

def main():

    age = float(input('Enter age: '))

    # insert statement here to call the buffet_price function

    print('Please pay $', price)

def buffet_price(age):

    if age >= 60 or age <= 10:

        price = 9

    else:

        price = 12

    return price

main()

Which of the following statements should be used to call the buffet_price function?

A.

buffet_price(price, age)

B.

buffet_price(age, price)

C.

price = buffet_price(age)

D.

age = buffet_price(price)

In: Computer Science

Hillside issues $4,000,000 of 6%, 15-year bonds dated January 1, 2019, that pay interest semiannually on...

Hillside issues $4,000,000 of 6%, 15-year bonds dated January 1, 2019, that pay interest semiannually on June 30 and December 31. The bonds are issued at a price of $3,456,448.
Required:
1. Prepare the January 1 journal entry to record the bonds’ issuance.
2(a) For each semiannual period, complete the table below to calculate the cash payment.
2(b) For each semiannual period, complete the table below to calculate the straight-line discount amortization.
2(c) For each semiannual period, complete the table below to calculate the bond interest expense.
3. Complete the below table to calculate the total bond interest expense to be recognized over the bonds' life.
4. Prepare the first two years of a straight-line amortization table.
5. Prepare the journal entries to record the first two interest payments.
1. Record the issue of bonds with a par value of $4,000,000 cash on January 1, 2019 at an issue price of $3,456,448

2. For each semiannual period, compute (a) the cash payment, (b) the straight-line discount amortization, and (c) the bond interest expense.

2(a) Par (maturity) value Annual Rate Year Semiannual cash interest payment
=
2(b) Par (maturity) value Bonds price Discount on Bonds Payable Semiannual periods Straight-line discount amortization
= =
2(c) Semiannual cash payment Discount amortization Bond interest expense

Complete the below table to calculate the total bond interest expense to be recognized over the bonds' life.

Total bond interest expense over life of bonds:
Amount repaid:
payments of
Par value at maturity
Total repaid
Less amount borrowed
Total bond interest expense

Prepare the first two years of a straight-line amortization table.

Semiannual Period-End Unamortized Discount Carrying Value
01/01/2019
06/30/2019
12/31/2019
06/30/2020
12/31/2020
  • 1

    Record the first interest payment on June 30.

  • 2

    Record the second interest payment on December 31.

In: Accounting

Sarah wants to buy equipment that is available at two stores. the price of the exercise...

Sarah wants to buy equipment that is available at two stores. the price of the exercise equipment is the same at both stores. PQR health would let her make quarterly payments of $4,780 for 6 years at a quarterly interest rate of 2.97%. Her first payment to PQR health would be due immediately. If ABC would let her make equal monthly payments of $2,190 for 5 years and if her first payment to ABC would be in 1 month, then what is the monthly interest rate that Sarah would be charged by ABC?

A. 1.51%

B. 1.62%

C. 1.69%

D. 1.74%

E. None of the above within .01 percentage point is the correct answer

In: Finance