Question: Dev C++ and please no handwritten programs SIMPLE CIRCUIT ANALYSIS (using inputloutput data files, for loops, and if else structurea) Voltage Resistance Current (V) -fahns)
Dev C++ and please no handwritten programs
SIMPLE CIRCUIT ANALYSIS (using inputloutput data files, for loops, and if else structurea) Voltage Resistance Current (V) -fahns) An example of a simple resisor cirouit is displayed bekow Current na)y be fatal. * In such circuits, VI is a voltage source(V) and RI is a resistor( calculated using Ohm's law The current in these circuits may be The power dissipated across the resistor is P IFR In the above equatiocas, lis the curent in amps ( Vis the voltage in volts (V), R is the resistance in obms( and Pis the power in Watts (W). An input data file called circuits contains voltage and resistance information Sor a set of simple resisr circuits The first recod line od the input file is the coetrol mber, which defines the mber of cirouits to be read into the progran 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. Write a Cprogram that will read the required values from the input file. Using the voltage and resistance compute the curent in each circuit and the power dissipated hy the resistor in each circuit. Your program will produce a report in tabular format. Print the table to the computer screen and to an output file called level: Ouce the program is working, modify the program to account for any curent that is greater than 0.1 amp. Instead of printing the normal column items, for any circuit with curent greater than O1 amp, print the voltage, the resistance, and then print a message that the current may be fatal. The output foemat is shown on page 2 Use the "Code Sectiv template to write your code. OUTPUT FORNMAT SIMPLE CIRCUIT ANALYSIS (using inputloutput data files, for loops, and if else structurea) Voltage Resistance Current (V) -fahns) An example of a simple resisor cirouit is displayed bekow Current na)y be fatal. * In such circuits, VI is a voltage source(V) and RI is a resistor( calculated using Ohm's law The current in these circuits may be The power dissipated across the resistor is P IFR In the above equatiocas, lis the curent in amps ( Vis the voltage in volts (V), R is the resistance in obms( and Pis the power in Watts (W). An input data file called circuits contains voltage and resistance information Sor a set of simple resisr circuits The first recod line od the input file is the coetrol mber, which defines the mber of cirouits to be read into the progran 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. Write a Cprogram that will read the required values from the input file. Using the voltage and resistance compute the curent in each circuit and the power dissipated hy the resistor in each circuit. Your program will produce a report in tabular format. Print the table to the computer screen and to an output file called level: Ouce the program is working, modify the program to account for any curent that is greater than 0.1 amp. Instead of printing the normal column items, for any circuit with curent greater than O1 amp, print the voltage, the resistance, and then print a message that the current may be fatal. The output foemat is shown on page 2 Use the "Code Sectiv template to write your code. OUTPUT FORNMAT
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
