1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Alexus [3.1K]
3 years ago
6

Implement this C program by defining a structure for each payment. The structure should have at least three members for the inte

rest, principle and balance separately. And store all the payments in a structure array (the max size of which could be 100). Name this C program as loanCalcStruct.c. Note: . In your answer sheet, for each C program above please attach a screenshot of the output when amount of loan is $2000, interest rate per year is %7.5 and number of payment is 6. . Put the source code of each C program above into your answer sheet Upload the c file of each Cprogram above into the submission folder of iCollege.

Engineering
1 answer:
Klio2033 [76]3 years ago
6 0

Answer:

#include<stdio.h>

#include<math.h>

void output_amortized(float loan_amount,float intrest_rate,int term_years)

{

  int i,j;                       //Month

  int payments;                   //Number of payments  

  float loanAmount;               //Loan amount

  float anIntRate;               //Yealy interest Rate

  float monIntRate;               //Monthly interest rate

  float monthPayment;           //Monthly payment

  float balance;                   //Balance due

  float monthPrinciple;           //Monthly principle paid

  float monthPaidInt;           //Month interest paid

 

  balance=loan_amount;

  //Calculations

  //Monthly interest rate

  monIntRate = ((intrest_rate/(100*12)));

  //Monthly payment

  payments=term_years;  

  monthPayment = (loan_amount * monIntRate * (pow(1+monIntRate, payments)/(pow (1+monIntRate, payments)-1)));

  monthPaidInt = balance * monIntRate;

  //Amount paid to principle

  monthPrinciple = monthPayment-monthPaidInt;

  //New balance due

  balance = balance - monthPrinciple;

 

  printf("\n\nMonthly payment should be :%.2f\n\n",monthPayment);

  printf("============================AMORTIZATION SCHEDUAL==========================\n");

  printf("#\tPayment\t\tIntrest\t\tPrinciple\t\tBalance\n");

 

  for(i=0;i<payments;i++)

  {

      printf("%d%9c%.2f%9c%.2f%16c%.2f%14c%.2f\n",(i+1),'$',monthPayment,'$',monthPaidInt,'$',monthPrinciple,'$',balance);

      monthPaidInt = balance * monIntRate;

      //Amount paid to principle

      monthPrinciple = monthPayment-monthPaidInt;

      //New balance due

      balance = balance - monthPrinciple;

  }

}

int main()

{

  float principle,rate;

  int termYear;

  printf("Enter the loan amount: $");

  scanf("%f",&principle);

  printf("Enter the intrest rate :%");

  scanf("%f",&rate);

  printf("Enter the loan duration in years: ");

  scanf("%d",&termYear);

  output_amortized(principle,rate,termYear);

}

Explanation:

see output

You might be interested in
53. The plan of a building is in the form of a rectangle with
schepotkina [342]

Answer: 150m

Explanation:

The following can be depicted from the question:

Dimensions of outer walls = 9.7m × 14.7m.

Thickness of the wall = 0.30 m

Therefore, the plinth area of the building will be:

= (9.7 + 0.30/2 + 0.30/2) × (14.7 × 0.30/2 + 0.30/2)

= 10 × 15

= 150m

7 0
3 years ago
melinda is using a rectangular brass bar in a sculpture she is creating. the brass bar has a length that is 4 more than 3 times
lawyer [7]

Answer:

180 x 60 inches

Width = 60 inches

Length = 180 inches

Explanation:

Given

Let L = Length

W = Width

P = Perimeter

Length = 3 * Width

L = 3W

Perimeter of Brass = 480 inches

P = 480

Perimeter is given as 2(L + W);

So, 2 (L + W) = 480

L + W = 480/2

L + W = 240

Substitute 3W for L; so,

3W + W = 240

4W = 240

W = 240/4

W = 60 inches

L = 3W

L = 3 * 60

L = 180 inches

6 0
3 years ago
Read 2 more answers
Which statement about tensile stress is true? A. Forces that act perpendicular to the surface and pull an object apart exert a t
svp [43]

Answer:

A. Forces that act perpendicular to the surface and pull an object apart exert a tensile stress on the object.

Explanation:

Tensile stress is referred as a deforming force, in which force acts perpendicular to the surface and pull an object apart, attempting to elongate it.

The tensile stress is a type of normal stress, in which a perpendicular force creates the stress to an object’s surface.

Hence, the correct option is "A."

3 0
3 years ago
Two common methods of improving fuel efficiency of a vehicle are to reduce the drag coefficient and the frontal area of the vehi
qaws [65]

Answer:

\Delta V = 209.151\,L, \Delta C = 217.517\,USD

Explanation:

The drag force is equal to:

F_{D} = C_{D}\cdot \frac{1}{2}\cdot \rho_{air}\cdot v^{2}\cdot A

Where C_{D} is the drag coefficient and A is the frontal area, respectively. The work loss due to drag forces is:

W = F_{D}\cdot \Delta s

The reduction on amount of fuel is associated with the reduction in work loss:

\Delta W = (F_{D,1} - F_{D,2})\cdot \Delta s

Where F_{D,1} and F_{D,2} are the original and the reduced frontal areas, respectively.

\Delta W = C_{D}\cdot \frac{1}{2}\cdot \rho_{air}\cdot v^{2}\cdot (A_{1}-A_{2})\cdot \Delta s

The change is work loss in a year is:

\Delta W = (0.3)\cdot \left(\frac{1}{2}\right)\cdot (1.20\,\frac{kg}{m^{3}})\cdot (27.778\,\frac{m}{s})^{2}\cdot [(1.85\,m)\cdot (1.75\,m) - (1.50\,m)\cdot (1.75\,m)]\cdot (25\times 10^{6}\,m)

\Delta W = 2.043\times 10^{9}\,J

\Delta W = 2.043\times 10^{6}\,kJ

The change in chemical energy from gasoline is:

\Delta E = \frac{\Delta W}{\eta}

\Delta E = \frac{2.043\times 10^{6}\,kJ}{0.3}

\Delta E = 6.81\times 10^{6}\,kJ

The changes in gasoline consumption is:

\Delta m = \frac{\Delta E}{L_{c}}

\Delta m = \frac{6.81\times 10^{6}\,kJ}{44000\,\frac{kJ}{kg} }

\Delta m = 154.772\,kg

\Delta V = \frac{154.772\,kg}{0.74\,\frac{kg}{L} }

\Delta V = 209.151\,L

Lastly, the money saved is:

\Delta C = \left(\frac{154.772\,kg}{0.74\,\frac{kg}{L} }\right)\cdot (1.04\,\frac{USD}{L} )

\Delta C = 217.517\,USD

4 0
3 years ago
A submarine submerges by admitting seawater (S = 1.03) into its ballast tanks. The amount of water admitted is controlled by air
ser-zykov [4K]

Answer:

Explanation:

Fw= y looking symbol sea water (2010.62-168171.2727/h+32.935)ft^3

6 0
3 years ago
Other questions:
  • To water his lawn, a homeowner uses two hoses. One connects to the faucet, the other to the end of the first hose to make the ho
    14·1 answer
  • How do Solar Engineers Help Humans?<br> (2 or more sentences please)
    9·1 answer
  • Consider the fully developed flow of glycerin at 40°C through a 60-m-long, 4-cm-diameter, horizontal, circular pipe. If the flow
    15·1 answer
  • HELP<br><br><br>the overall width of a part is dimensioned as 3.00 ± 0.02. what is the tolerance
    14·2 answers
  • We need to design a logic circuit for interchanging two logic signals. The system has three inputs I1I1, I2I2, and SS as well as
    11·1 answer
  • Problem 4.041 SI Refrigerant 134a enters an insulated compressor operating at steady state as saturated vapor at -26oC with a vo
    8·1 answer
  • Fluid systems can distribute pressure unequally to all points in a system.<br><br> True<br> False
    15·1 answer
  • Prelest! Introduction to Engineering and Technology 1 Select the correct answer. What technological invention allowed for the pr
    5·1 answer
  • ) If the blood viscosity is 2.7x10-3 Pa.s, length of the blood vessel is 1 m, radius of the blood vessel is 1 mm, calculate the
    13·1 answer
  • Rivet gauge, or transverse pitch is the distance between the Group of answer choices heads of rivets in the same row. centers of
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!