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
Design circuits that demonstrate all of the principles listed below. Set up the circuits and take measurements to show that the
Nata [24]

<u>Explanation</u>:

For series

\Delta V=V_{1}+V_{2}+\ldots+V_{n}=I R_{1}+I R_{2}+\ldots+I R_{n}(\text {voltages add to the batter } y)

\(I=I_{1}=I_{2}=I_{n}\) (current is the same)

V=I R(\text {voltage is directly proportional to } R)

R_{e q}=R_{1}+R_{2}+\ldots+R_{n} \quad \text { (resistance increase) }

For parallel

\Delta V=\Delta V_{1}=\Delta V_{2}=\Delta V_{n} \quad(\text { same voltage })

I=I_{1}+I_{2}+\ldots+I_{n}(\text {current adds})

\(I=\frac{\Delta V}{R_{e q}} \quad(R \text { inversal } y \text { proportional to } I)\)

\frac{1}{R_{e q}}=\frac{1}{R_{1}}+\frac{1}{R_{2}}+\ldots+\frac{1}{R_{n}}

3 0
3 years ago
Outline the process used to test the following hypothesis: Titanium cages are stronger than steel cages for hockey goalie masks.
son4ous [18]

Answer:

true

Explanation:

8 0
2 years ago
The gas expanding in the combustion space of a reciprocating engine has an initial pressure of 5 MPa and an initial temperature
Anit [1.1K]

Answer:

a). Work transfer = 527.2 kJ

b). Heat Transfer = 197.7 kJ

Explanation:

Given:

P_{1} = 5 Mpa

T_{1} = 1623°C

                       = 1896 K

V_{1} = 0.05 m^{3}

Also given \frac{V_{2}}{V_{1}} = 20

Therefore, V_{2} = 1  m^{3}

R = 0.27 kJ / kg-K

C_{V} = 0.8 kJ / kg-K

Also given : P_{1}V_{1}^{1.25}=C

   Therefore, P_{1}V_{1}^{1.25} = P_{2}V_{2}^{1.25}

                     5\times 0.05^{1.25}=P_{2}\times 1^{1.25}

                     P_{2} = 0.1182 MPa

a). Work transfer, δW = \frac{P_{1}V_{1}-P_{2}V_{2}}{n-1}

                                  \left [\frac{5\times 0.05-0.1182\times 1}{1.25-1}  \right ]\times 10^{6}

                              = 527200 J

                             = 527.200 kJ

b). From 1st law of thermodynamics,

Heat transfer, δQ = ΔU+δW

   = \frac{mR(T_{2}-T_{1})}{\gamma -1}+ \frac{P_{1}V_{1}-P_{2}V_{2}}{n-1}

  =\left [ \frac{\gamma -n}{\gamma -1} \right ]\times \delta W

  =\left [ \frac{1.4 -1.25}{1.4 -1} \right ]\times 527.200

  = 197.7 kJ

6 0
2 years ago
The process _______ boosted the production of fertilizers and strengthened the agriculture industry.
ANTONII [103]

Answer:

Process of Green Revolution

Explanation:

Green Revolution is a process which started its initiatives between the 1950s and 1960s, a technological research process, that increase agricultural productions through various systematic approach, which are different from the traditional methods. These technological approach includes:

1.  Utilization of new varieties with a high yield potential, in addition with adequate water  supply, pesticides and fertilizers.

2.  New methods of cultivation and mechanization

Hence, the process of Green Revolution boosted production of fertilizers and strengthen the agriculture industry as a whole.

6 0
3 years ago
A drilling operation is performed on a steel part using a 12.7 mm diameter twist drill with a point angle of 118 degrees. The ho
Masteriza [31]

Answer:

a. Rotational speed of the drill  = 375.96 rev/min

b. Feed rate  = 75 mm/min

c. Approach allowance  = 3.815 mm

d. Cutting time  = 0.67 minutes

e. Metal removal rate after the drill bit reaches full diameter. = 9525 mm³/min

Explanation:

Here we have

a. N = v/(πD) = 15/(0.0127·π) = 375.96 rev/min

b. Feed rate = fr = Nf = 375.96 × 0.2 = 75 mm/min

c. Approach allowance = tan 118/2 = (12.7/2)/tan 118/2 = 3.815 mm

d. Approach allowance T∞ =L/fr = 50/75 = 0.67 minutes

e. R = 0.25πD²fr = 9525 mm³/min.

7 0
2 years ago
Other questions:
  • for high-volume production runs, machining parts from solid material might not be the best choice of manufacturing operations be
    12·1 answer
  • Vehicles arrive at a single toll booth beginning at 8:00 A.M. They arrive and depart according to a uniform deterministic distri
    9·1 answer
  • Technician A says ASE certification is mandatory in all 50 states before performing an automotive repair for pay. Technician B s
    12·1 answer
  • How to build a laser pointer?
    12·1 answer
  • Consider two different types of motors. Motor A has a characteristic life of 4100 hours (based on a MTTF of 4650 hours) and a sh
    10·1 answer
  • Under EPA's regulations, which of the following methods can be used to pressurize an R11 or R123 system for the purpose of openi
    11·1 answer
  • Products. of sheet metal​
    8·1 answer
  • The van der Waals equation is a modification of the ideal gas equation. What two factors does this equation account for? A. (1)
    6·1 answer
  • A single phase molor is located
    14·1 answer
  • To measure the greening of the U.S. economy, you need only to look at the growing number of green jobs and occupations.
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!