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
How may a Professional Engineer provide notice of licensure to clients?
azamat

Find full question attached

Answer:

(b) By including a statement that he or she is licensed by the Board for Professional Engineers and Land Surveyors immediately above the signature line in at least 12 point type on all contracts for services

Explanation:

A PE(professional engineer) licensee must show that he is licensed in order to show and ensure public safety as he is qualified for the job he is handling. The California regulations on professional engineers holds that all professional engineers must be licensed by the board of professional engineers and Land surveyors in order to operate legally as an engineer. The engineer may show licensure through the following options:

The engineer might provide statement to each client to show he is licensed which would then be signed by the client

The engineer may choose to post a wall certificate in his work premises to show he is licensed

The engineer may choose to include a statement of license in a letterhead or contract document which must be above the client's signature line and not less than 12 point type

4 0
3 years ago
5) /
Tpy6a [65]

Answer:

I don't understand...

4 0
3 years ago
This search compares the target value with the middle element in the collection, then ignores the half of the collection in whic
love history [14]

Answer:

d) Binary

Explanation:

Binary search is a search algorithm that finds the position of a value in an ordered array. It compares the value with the element in the middle of the array, if they are not equal, half in which the value cannot be eliminated and the search continues in the remaining half until the value is found.

7 0
2 years ago
Match the test to the property it measures.
Vinvika [58]

Answer:

a. Rockwell              3. hardness

b. Instron                 2. stress vs strain

c. Charpy                 1. impact strength

d. Fatigue                4. Endurance Limit

e. Brinell                  3. hardness

f. Izod                      1. impact strength

Explanation:

Izod and Charpy are the impact strength testing procedure of a material in which a heavy hammer is attached to an arm is released to impact on the test specimen. In Izod test the specimen with v-notch is held vertical with the notch facing outward while in Charpy test the specimen is supported horizontally with notch facing inward to the impacting hammer.

Instron testing system does universal testing of the material which gradually applies the load recording all the stresses and the corresponding strains until the material fails.

Fatigue is the property of a material due to which it fails under the repeated cyclic loading by the initiation and propagation of cracks. The property of a material resist failure subjected to infinite number of repeated cyclic loads below a certain stress limit.

Rockwell and Brinell are the hardness testing methods. In Rockwell test an intender ball is firstly pressed against the specimen using minor load for a certain time and then a major load is pressed against it for a certain time. After the intender is removed the depth of impression on the surface is measured while in case of Brinell hardness we apply only one load against the intender ball for a certain time and after its removal the radius of impression is measured.

7 0
3 years ago
6.1-2. Diffusion of CO, in a Binary Gas Mixture. The gas CO2 is diffusing at stcady state through a tube 0.20 m long having a di
zzz [600]

Answer:

Heat flux of CO₂ in cgs

                 = 170.86 x 10⁻⁹ mol / cm²s

SI units

       170.86 x 10⁻⁸ kmol/m²s  

Explanation:

4 0
3 years ago
Other questions:
  • A pipe of 10 cm inner diameter is used to send crude oil over distance of 400 meters. The entire pipe was laid horizontal. The v
    5·1 answer
  • How an AK 47 gun was works​
    14·1 answer
  • an adiabatic compressor receives 1.5 meter cube per second of air at 30 degrees celsius and 101 kpa. The discharge pressure is 5
    11·1 answer
  • A baseband signal with a bandwidth of 100 kHz and an amplitude range of±1 V is to be transmitted through a channel which is cons
    8·2 answers
  • Consider the cascade of the three LTI systems having impulse responses: h-1(t) = e^-tu(t + 3) h_2(t) = rect((1 -1)/2) h_3(t) = d
    8·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
  • thanh thẳng AD có kích thước và chịu lực như hình.biết P1 = 10kn, p2=5kn,M=15kn*m,a=2m.Hãy xách định phản lực liên kết tại A,b
    14·1 answer
  • Which type of elevated stand does not need a tree?
    13·1 answer
  • The A/C compressor will not engage when the A/C is turned on. The static refrigerant pressure is 75 psi and the outside temperat
    8·1 answer
  • Which of the following situations best describes student engaged in active learning
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!