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].

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

7. 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.:- M92783513
  • Price:- $10

Priced at Now at $10, Verified Solution

Have any Question?


Related Questions in Computer Engineering

Problem belowwrite a program that uses a function that

Problem below: Write a program that uses a function that returns a number between 1 and 6. Use this function to simulate the roll of a die. Allow the user to specify the number of trials and then tabulate that number of ...

As a wealthy graduate of the university you have decided to

As a wealthy graduate of the University, you have decided to give back to the University in the form of a scholarship. You have decided to donate a one-time gift of $500,000 that will be invested at a rate of 5.5% per ye ...

Give a recursive algorithm that generates a similar series

Give a recursive algorithm that generates a similar series of coins for changing n cents. Don't use dynamic programming for this problem.

Task the first task is to create your business narrative

Task The first task is to create your business narrative. Some of the questions that you should address include (but are not limited to) the following. •What is the name of your business? •Who will be the users of the sy ...

A street vendor is asking people to play a simple game you

A street vendor is asking people to play a simple game. You roll a pair of dice. If the sum on the dice is 10 or higher, you win $10. If you roll a pair of 1's, you win $59. Otherwise you lose $5. If the random variable ...

Assignment 1 multi-touch screens vs mouse-driven screensthe

Assignment 1: Multi-Touch Screens vs. Mouse-Driven Screens The following resources may be helpful when completing this assignment. • Dearden, A. (2008). User-Centered Design Considered Harmful • Norman, D. (2007-2010). A ...

Question bull studentssidnameagegpabull coursesciddeptid

Question : • students(sid,name,age,gpa) • courses(cid,deptid, description) • professors(ssn,name,address,phone,deptid) • enrollment(sid,cid,section • teaches(cid,section,grade). cid makes reference to the courses table. ...

Show a schedule with two transactions that share a single

Show a schedule with two transactions that share a single data item (A in block BA) and that is not serializable, but that is equivalent to a serial schedule of the two transactions for certain initial values of A. Indic ...

The following data is the results of a random sample of the

The following data is the results of a random sample of the ages (in years) of 12 houses in a community: 18, 22, 23, 19, 18, 24, 26, 20, 17, 12, 27, 28. Assume the population is normal. Construct a 90% confidence interva ...

A different ethanol processing facility costs 800000 to

A different ethanol processing facility costs $800,000 to construct but will instead last forever. Every year (starting the year after construction), it produces 10,000 barrels of ethanol and can charge a price of $4 per ...

  • 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