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
A woodcutter wishes to cause the tree trunk to fall uphill, even though the trunk is leaning downhill. With the aid of the winch
Sedbober [7]

Answer:

The correct answer will be "400.4 N". The further explanation is given below.

Explanation:

The given values are:

Mass of truck,

m = 600 kg

g = 9.8 m/s²

On equating torques at the point O,

⇒  T\times Cos(10+5)\times (1.3+4)=mg\times Sin(5)\times 4

So that,

On putting the values, we get

⇒  T\times Cos(15^{\circ})\times 5.3=600\times 9.8\times Sin(5^{\circ})\times 4

⇒                             T=400.4 \ N

8 0
3 years ago
Vending machine controller (adapted from Katz, "Contemporary Logic Design") Design and implement a finite state machine that con
babunello [35]

Answer:

Check the explanation

Explanation:

A vending machine controller is that type of machine that comes with a single serial port on the same chip as the programmable processor. The controller comprises of a port arbitrator that selectively attaches or links one of a number of serially communicating devices to this single serial port.

Kindly check the attached image to get the step by step explanation to the above question.

6 0
3 years ago
A gas flows through a one-inlet, one-exit control volume operating at steady state. Considering an adiabatic control volume with
Hunter-Best [27]

Answer:

b. equal to the specific entropy of the gas at the inlet.

Explanation:

Isentropic process is the process in which the entropy of the system remains unchanged. The word isentropic is formed from the combination of the prefix "iso" which means "equal" and the word entropy.

If a process is completely reversible, without the need to provide energy in the form of heat, then the process is isentropic.

3 0
3 years ago
An amplifier with 40 dB of small-signal, open-circuit voltage gain, an input resistance of 1 MO, and an output resistance of 100
Vanyuwa [196]

convert 40db to standard gain

AL=10^40/20=100

calculate total voltage gain

=AL×RL/RL+Ri

=83.33

38.41 DB

calculate power

Pi=Vi^2/Ri Po=Vo^2/RL

power gain= Po/Pi

=13.90×10^6

3 0
3 years ago
Explain how feedback control is used to<br> adjust robotic movements.
LuckyWell [14K]

Answer:

Feedback control of arm movements using Neuro-Muscular Electrical Stimulation (NMES) combined with a lockable, passive exoskeleton for gravity compensation

6 0
2 years ago
Other questions:
  • An air-standard Otto cycle has a compression ratio of 6 and the temperature and pressure at the beginning of the compression pro
    13·1 answer
  • Automotive service P2 Wastewater Management and Handling Spins
    9·1 answer
  • A town is designing a rectangular, 4m deep settling tank for treating surface water intake. The tank will have a flow velocity o
    14·1 answer
  • A single-phase inductive load draws a 10 MW at 0.6 power factor lagging. Calculate the reactive power of a capacitor to be conne
    14·1 answer
  • When a user process is interrupted or causes a processor exception, the x86 hardware switches the stack pointer to a kernel stac
    13·1 answer
  • A subsurface exploration report shows that the average water content of a fine-grained soil in a proposed borrow area is 22% and
    9·1 answer
  • When an emergency vehicle approaches you from in front or behind you, what should you do?
    14·1 answer
  • A jet aircraft is in level flight at an altitude of 30,000 ft with an airspeed of 500 ft/s. The aircraft has a gross weight of 1
    11·1 answer
  • ABS system is necessary?
    6·1 answer
  • An open tank contain oil of specific gravity 0.75 on top of
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!