Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

PROGRAM A:

Consider the problem of a user-specified number N of resistors with user-specified values of resistances connected in series across a battery whose terminal voltage VB is also user-specified. The N resistances are represented by a one-dimensional array R[N]. Design a program in C which will compute in an infinite loop the following:

  1. the equivalent resistance req to the N series-connected resistors,
  2. the current I in the circuit,
  3. the voltage array V[N] representing the voltage across the N resistors, and
  4. the power array P[N] representing the powers dissipated in the N resistors.
  5. The problem is to be solved using the method of call by value in which the calculation and outputting of req, I, V[N] and P[N] is to be performed from within a prototype function called "series" placed after the main function. Note that the formula for the voltage across resistance R[i] is V[i] = R[i] * I, and the power dissipated in resistance R[i] is P[i] = R[i] * I2.

When executed, the program will do the following in the indicated sequence:

1. Ask the user to type on the keyboard a value for the number N of resistors connected in series.

2. Ask the user to type on the keyboard the values R[0], R[1], R[2],.., R[N-1] of these N resistors.

3. Compute and display on the console the value of the equivalent resistance req to the N resistors connected in series which is given by the formula req = R[0] + R[1] + R[2] + ... + R[N-1.

4. Compute and display on the console the value of the current I in the circuit given by the formula I=VB/req.

5. Compute and display on the console the values of the elements of the voltage array V[N].

5. Compute and display on the console the values of the elements of the power array P[N].

6. Go back to step 1 and repeat the process ad infinitum.

PROGRAM B:

Modify PROGRAM A so that the N resistors are now connected in parallel across the battery. In the present program, the calculation is to be of the equivalent resistance req to the N resistors connected in parallel, the current I supplied by the battery, the current array I[N] representing the currents in the N resistors, and the power array P[N] representing the powers dissipated in the N resistors.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92785031
  • Price:- $30

Priced at Now at $30, Verified Solution

Have any Question?


Related Questions in Computer Engineering

Suppose that on your birthday you checked the balance on

Suppose that on your birthday you checked the balance on your retirement account and you decided to make a $1,000 payment at the end of every month until you retire at the specified age. If you disreagard the inflation ( ...

From a security standpoint do you believe the apple

From a security standpoint, do you believe the Apple approach of hiding permissions or the Android approach of requiring the user to accept application permissions is a better approach? Why do you feel this way and do yo ...

Systems requirements and analysisyou have been hired to

Systems requirements and analysis You have been hired to lead a software project to design a Library Management System (LMS) for your local library at Jonesville. The library has been managed manually using written docum ...

Explain that when an unauthorized individual gains access

Explain that when an unauthorized individual gains access to the information an organization trying to protect, that act is categorized as a deliberate act of espionage or trespass.

Starbucks the enclosed is the strategy definition for

Starbucks: The enclosed is the Strategy Definition for Starbucks. ( 1-2 pages rought draft) Using one of the cases studies in the text or one identifed by the team on its own, prepare a report addressing the following ke ...

It has been a bad day for the stock market and you have

It has been a bad day for the stock market and you have heard that only 30% of all stocks gained value. Suppose you have a portfolio of 10 securities and assume a binomial distribution for the number of your stocks that ...

What is the purpose of load balancing i need full

What is the purpose of load balancing? (I need full explanation) I already know what load balancing is, I just need to know why we use it

Run the huffman coding algorithm on the following

Run the Huffman coding algorithm on the following input: Alphabet C = {p, r, a, i, s, e, d}, with frequencies f as percentages= {12, 16, 16, 12, 16, 16, 12}. Draw the optimal coding tree and the (weighted) average code l ...

Given a list of numbers l a value x is said to be a

Given a list of numbers L, a value x is said to be a majority value if the value of over half the elements in L is x; in other words, if L has n elements and nx is the number of elements in L with value x, then x is a ma ...

Question purpose to assess your ability tobulldiscuss

Question: Purpose: To assess your ability to: • Discuss terminology, concepts, and procedures related to database management systems. Action Items: • Write your response to 2 of the following discussion topics and post y ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As