Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Create a script file Include comment statements in your program to plan out the

ID: 3693842 • Letter: C

Question

Create a script file Include comment statements in your program to plan out the solution. Implement Write a function file for calculating the equivalent resistance for N resistors in parallel The function should be sent a vector that contains all the resistances. You may send other information as needed. The function should return the equivalent resistance. Print the function file to pdf and submit to the Carmen Dropbox. Continue on to Part 2. Write a function file for the series resistors. In the script file, perform the following tasks: Prompt the user for all inputs Compute the equivalent resistance of the resistors using the two functions described above. Display this value to the screen Prompt the user to see if he/she wants to quit. Repeat the program if necessary. You may need to clear the vectors To dear individual variables type dear and then the variable name. Use the program to determine which circuits (A D) on the following page give an equivalent resistance of 1300 Ohm. Add an fpnntf() statement to the end of your program which prints to the command window the answer. Your program must be run to show the results for all 4 circuits given. Evaluate Perform a hand calculation to verify your answer. Document Print (paper or pdf depending on instructor preference) the final version of your script file. Print (paper or pdf depending on Instructor preference) the command window output. Print (paper or pdf depending on instructor preference) the calculation for the evaluate step. If paper: Staple the script file, function files, output, and verification together and turn it in. If pdf Combine pdf files together and submit to Carmen Dropbox.

Explanation / Answer

Program to calculate the equivalent resistance of N resistors in parallel is as below:

#include <stdio.h>
#include<stdlib.h>
int main() {
   int N,i;
   float *r,par_res=0;
   printf("Enter the number of resistors ");
   scanf("%d ",&N);
   r=(float *)malloc(N*sizeof(float));
   for(i=0;i<N;i++)
   {
       scanf("%f ",&r[i]);
       r[i]=1/r[i];
   }
   for(i=0;i<N;i++)
   {
   par_res=par_res+r[i];  
   }
   par_res=1/par_res;
   printf("%0.3f ohms is equivalent parallel resistance ",par_res);
   return 0;
   }

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote