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.:- M92782056
  • Price:- $20

Priced at Now at $20, Verified Solution

Have any Question?


Related Questions in Computer Engineering

There is a lot of information about how relevant this type

There is a lot of information about how relevant this type of thick clients is still. What are the advantages/disadvantages of these type of connections?

Suppose you are given a connected graph g with edge costs

Suppose you are given a connected graph G, with edge costs that are all distinct. Prove that G has a unique minimum spanning tree.

On a certain banking machine customers arrive at an average

On a certain banking machine customers arrive at an average of 15 per hour. a) What is the probability that 12 customers will use the machine in the next hour? b) What is the probability that there will be fewer than 3 c ...

Do the next application and answer the questions1 print a

Do the next application and answer the questions: 1 /** Print a friendly greeting. */ 2 public static void main(String[] args) { 3 int index; 4 for(index = 0; index 6} 7} Questions: 1. What is the scope of index in the a ...

Strings in cstrings manipulationwrite one main code with

Strings in C++ Strings manipulation Write one main code with the following functions. Toggle Write a function called toggle() that accepts a string, and an integer. The function checks whether the character at the positi ...

Suppose there are three decks of cards on the table a

Suppose there are three decks of cards on the table, a number is written on each card. And each deck is sorted in decreasing order (The maximum value is on the deck in top). The goal is to find the minimum value between ...

In a large university 6 of students live in dormitories a

In a large university, 6% of students live in dormitories. A random sample of 14 students is selected. What is the probability that the sample contains more than five students who do not live in the dormitories?

What is a domain name in the context of internet what is

What is a domain name in the context of Internet? What is the procedure to get a domain name and link it to an Internet Protocol (IP) address? Use an example.

Anova labyou are interested in studying the neurological

ANOVA Lab You are interested in studying the neurological effects of dehydrogenated brominate oil, a food additive.  You randomly select 25 Sprague-Dawley rats and add a dosage to their drinking water. Because the additi ...

Question provide a real-world example or describe a

Question: Provide a real-world example or describe a hypothetical situation in which a legitimate organization used spam in an effective and nonintrusive manner to promote a product or service. Need 300-350 words APA sta ...

  • 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