Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ENGR 200 SPRING 2018 P6: SIMPLE CIRCUIT ANALYSIS (using functions, input/output data files, for loops, and ifielse structures) DUE: March 20,2018, at 11:59 p.m. US

image text in transcribed
image text in transcribed
ENGR 200 SPRING 2018 P6: SIMPLE CIRCUIT ANALYSIS (using functions, input/output data files, for loops, and ifielse structures) DUE: March 20,2018, at 11:59 p.m. US Central Time INTRODUCTION: An example of a simple resistor circuit is displayed below. POINTS: 60 Insuch circuits, VI is a voltage source (V) and R1 is a resistor (). The current in these circuits may be calculated using Ohm's law: The power dissipated across the resistor is In the above equations, l is the current in amps (A), V is the voltage in volts (V), R is the resistance in obnms (), and P is the power in Watts (W). An input data file called circuits contains voltage and resistance information for a set of simple resistor circuits. The first record line of the input file is the control number, which defines the number of circuits to be read into the program. Each succeeding record line has two columns, where the first column is the voltage and the second column is the resistance. The input file is comma delimited. ASSIGNMENT: Write a C program that will read the required values from the input file. Using the voltage and resistance, compute the current in each circuit and the power dissipated by the resistor in each circuit. Write a user-defined function to compute the current and a user-defined function to compute the power. Your program will produce a report in tabular format. Print the table to the computer screen and to an output file called levels. Once the program is working, modify the program to account for any current that is greater than 0.1 amp. Instead of printing the nomal column items, for any circuit with current greater than 0.1 amp, print the voltage, the resistance, and then print a message that the current may be fatal. The output format is shown on page 2

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data, Mining, And Analytics Components Of Strategic Decision Making

Authors: Stephan Kudyba

1st Edition

1466568704, 9781466568709

Students also viewed these Databases questions

Question

LO6 Describe how individual pay rates are set.

Answered: 1 week ago