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
If the rotational speed of a pump motor is reduced by 35%, what is the effect on the pump performance in terms of capacity, head
FinnZ [79.3K]

Answer:

- the capacity of the pump reduces by 35%.

- the head gets reduced by 57%.

the power consumption by the pump is reduced by 72%

Explanation:

the pump capacity is related to the speed as speed is reduces by 35%

so new speed is (100 - 35) = 65% of orginal speed

speed Q ∝ N ⇒ Q1/Q2 = N1/N2

Q2 = (N2/N1)Q1    

Q2 = (65/100)Q1

which means that the capacity of the pump is also reduces by 35%.

the head in a pump is related by

H ∝ N² ⇒ H1/H2 = N1²/N2²

H2 = (N2N1)²H1

H2 = (65/100)²H1 = 0.4225H1

so the head gets reduced by 1 - 0.4225 = 0.5775 which is 57%.

Now The power requirement of a pump is related as

P ∝ N³ ⇒ P1/P2 = N1³/N2³

P2 = (N2/N1)³P1

H2 = (65/100)²P1 = 0.274P1

So the reduction in power is 1 - 0.274 = 0.725 which is 72%

Therefore for a reduction of 35% of speed there is a reduction of 72% of the power consumption by the pump.  

8 0
3 years ago
Which best explains Susan B Anthony purpose in her speech “Women’s rights to the suffrage”
Furkat [3]

Answer:

She wrote and delivered a speech in 1873, which came to be known as the “Women's Rights to the Suffrage” speech. In her address, she lets the audience know of her “crime” of voting. She reminds the listener that the Constitution of the United States says “we the people” and does not exclude women as people

6 0
3 years ago
Read 2 more answers
What is a smooth flow of air over a surface is called?
pochemuha

Answer:

laminar flow

Explanation:

In fluid dynamics, laminar flow is characterized by fluid particles following smooth paths in layers, with each layer moving smoothly past the adjacent layers with little or no mixing.

4 0
3 years ago
Drum brakes are usually designed so that the condition of the lining can be checked even if the drum has not been
artcher [175]

Answer:

no it has to be removed

Explanation:

8 0
3 years ago
Thermosets burn upon heating. a)-True b)- false?
hram777 [196]

Answer:

true

Explanation:

True, there are several types of polymers, thermoplastics, thermosets and elastomers.

Thermosets are characterized by having a reticulated structure, so they have low elasticity and cannot be stretched when heated.

Because of the above, thermosetting polymers burn when heated.

5 0
3 years ago
Other questions:
  • A milling operation was used to remove a portion of a solid bar of square cross section. Forces of magnitude P = 18 kN are appli
    15·1 answer
  • 50.38
    14·1 answer
  • A wastewater treatment plant discharges 1.0 m3/s of effluent having an ultimate BOD of 40.0 mg/ L into a stream flowingat 10.0 m
    11·1 answer
  • Please answer question #2
    6·1 answer
  • A manager has a list of items that have been sorted according to an item ID. Some of them are duplicates. She wants to add a cod
    7·1 answer
  • A 26-tooth pinion rotating at a uniform 1800 rpm meshes with a 55-tooth gear in a spur gear reducer. Both pinion and gear are ma
    11·1 answer
  • Match each situation with the type of material (conductor or inductor) you would want to use in it. You need to connect a recent
    15·1 answer
  • What is meant by the acronym ISO
    15·1 answer
  • Engineered lumber should not be used for
    15·1 answer
  • Which type of system is being researched to deliver power to several motors to drive multiple systems in vehicles?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!