Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

a Dev-C++ program code using (using input/output data files, for loops, and if/else structures). input file is circuit.txt file INTRODUCTION: OUTPUT FORMAT: An example of

a Dev-C++ program code using

(using input/output data files, for loops, and if/else structures).

input file is circuit.txt file

image text in transcribed

INTRODUCTION: OUTPUT FORMAT: An example of a simple resistor circuit is displayed below. ****888*************************************** CIRCUIT AMPERAGE AND POWER Voltage Resistance Current Power In such circuits, vi is a voltage source (v) and RI (ohms) (A) (W) X.XX X.XX current in these circuits may be calculated using Ohm's law: Current may be fatal. The power dissipated across the resistor is FILE PATHS: In the above equations, Iis the current in amps (A), Vis the voltage in Before submitting your C source program, make sure that you set your volts (V), Ris the resistance in ohms (S2), and Pis the power in Watts w). input and output file paths to U ENGR 200 An input data file called circuits contains voltage and resistance information for a set of simple resistor circuits. The first record line ofthe input file is the control number, which defines the number of circuits to be 13 read into the program. Each succeeding record line has two columns, 480, 5100 where the first column is the voltage and the second column is the resistance. The input file is comma delimited. 192,1800 192, 2100 ASSIGNMENT: 810, 3000 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 190, 25 the power dissipated by the resistor in cach circuit. Your program will 380, 100 Circuits txt produce a report in tabular format. Print the table to the computer screen 400, 4250 and to an output file called levels 400, 2500 Once the program is working, modify the program to account 240, 3000 current that is greater than 0.1 amp. Instead of printing the normal column 240,2500 items, for any circuit with current greater than 0.1 amp, print the voltage, he resistance, and then print a message that the current may be fatal. The 150, 1600 output format is shown on page 2 110, 9200 910,750

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

Database And Transaction Processing

Authors: Philip M. Lewis, Arthur Bernstein, Michael Kifer

1st Edition

0201708728, 978-0201708721

More Books

Students also viewed these Databases questions