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
What should always be done before beginning any diagnosis?
vladimir2022 [97]

Answer:

c

Explanation:

if someone is wrong that they can help with

4 0
3 years ago
A gear train has two gears. The driver gear has 8 teeth and a diametral pitch of 6 teeth/inch. the follower gear has 24 teeth. W
Sliva [168]

Answer:

18 teeth/inch

Explanation:

Given that: i. driver gear has 8 teeth and diametral pitch of 6 teeth/inch.

                  ii. follower gear has 24 teeth.

Let the followers diametral pitch be represented by x.

Then,

8 teeth ⇒  6 teeth/inch

24 teeth ⇒ x teeth/inch

So that;

x = \frac{24 x 6}{8}

   = \frac{144}{8}

   = 18 teeth/inch

The diametral is 18 teeth/inch

3 0
3 years ago
What is differentiation​
oksian1 [2.3K]

Answer:

the action or process of differentiating or distinguishing between two or more things or people.

7 0
2 years ago
The AGC control voltage: ___________
lyudmila [28]

Answer:

The AGC circuit operates with an input voltage range of 60 dB (5 mV p-p to 5 V p-p), with a fixed output voltage of 250 mV p-p.

Explanation:

3 0
3 years ago
11–17 A long, thin-walled double-pipe heat exchanger with tube and shell diameters of 1.0 cm and 2.5 cm, respectively, is used t
lana [24]

Answer:

the overall heat transfer coefficient of this heat exchanger is 1855.8923 W/m²°C

Explanation:

Given:

d₁ = diameter of the tube = 1 cm = 0.01 m

d₂ = diameter of the shell = 2.5 cm = 0.025 m

Refrigerant-134a

20°C is the temperature of water

h₁ = convection heat transfer coefficient = 4100 W/m² K

Water flows at a rate of 0.3 kg/s

Question: Determine the overall heat transfer coefficient of this heat exchanger, Q = ?

First at all, you need to get the properties of water at 20°C in tables:

k = 0.598 W/m°C

v = 1.004x10⁻⁶m²/s

Pr = 7.01

ρ = 998 kg/m³

Now, you need to calculate the velocity of the water that flows through the shell:

v_{w} =\frac{m}{\rho \pi (\frac{d_{2}^{2}-d_{1}^{2}  }{4} )} =\frac{0.3}{998*\pi (\frac{0.025^{2}-0.01^{2}  }{4}) } =0.729m/s

It is necessary to get the Reynold's number:

Re=\frac{v_{w}(d_{2}-d_{1}) }{v} =\frac{0.729*(0.025-0.01)}{1.004x10^{-6} } =10891.4343

Like the Reynold's number is greater than 10000, the regime is turbulent. Now, the Nusselt's number:

Nu=0.023Re^{0.8} Pr^{0.4} =0.023*(10891.4343)^{0.8} *(7.01)^{0.4} =85.0517

The overall heat transfer coefficient:

Q=\frac{1}{\frac{1}{h_{1} }+\frac{1}{h_{2} }  }

Here

h_{2} =\frac{kNu}{d_{2}-d_{1}} =\frac{0.598*85.0517}{0.025-0.01} =3390.7278W/m^{2}C

Substituting values:

Q=\frac{1}{\frac{1}{4100}+\frac{1}{3390.7278}  } =1855.8923W/m^{2} C

5 0
3 years ago
Other questions:
  • tech a says that a tire with more wear on the center of the tread is caused by under inflation of the size tech b says featherin
    12·1 answer
  • A stream of air enters a 7.00-cm ID pipe at a velocity of 30.0 m/s at 27.0°C and 1.80 bar (gauge). At a point downstrream, the a
    15·1 answer
  • The amount of time an activity can be delayed and yet not delay the project is termed:_________
    14·1 answer
  • What should -7/56 BE DIVIDE TO GET -1/8​
    14·2 answers
  • Identify renewable energy sources you will propose. Explain the key elements to your solution and the basic technical principles
    5·1 answer
  • Suppose to build RSA crypto system you picked primes "p" and "q" as 3 and 7 and "e" as 5 what are the public and private keys? W
    11·1 answer
  • Technician A says that the most commonly used combustion chamber types include hemispherical, and wedge. Technician B says that
    9·1 answer
  • 6.3. A __________ is used to indicate the base material that needs to be beveled.
    12·1 answer
  • Explain wet and dry compression tests​
    6·1 answer
  • Which traits are common in all four career pathways of the Information Technology field? Check all that apply.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!