Question: Hello, I'm currently taking a C++ course and I'm learning how to use the for loop. My professor gave the class assignments to do, but
ASSIGNMENT #5 1. Create a program that will compute the voltage drop across a resistor for a range of current values selected by the program user. The program user is input the value of the resistor, the beginning and ending current values, and the incremental of the current. The relationship between the resistor voltage and current is given by V IR Where V Voltage across the resistor in volts I Current in the resistor in amps R Value of the resistor in ohms Use 4700 ohms for R with the current varying from 500mA to A in steps of 250mA. Use a for loop. The output of the program should be an appropriate title which identifies the program and include your name, followed by a Table (a list) with the values of currents used and the values of the calculated voltages. Use Notepad to enter the V, l values that were output by the above program into a data file called C:IV-I.txt, and then have GNUPLOT plot this data. Submit a printout of your program, the printed output list, and a copy of this graph to your instructor. 2. Develop a program that will calculate the power dissipated in a resistor for a range of voltage values across the resistor. The relationship is given by Where Power dissipation of the resistor in watts V Voltage across the resistor in volts R Value of the resistor in ohms Use the voltage values 1 through 10 in steps of l V and R-40 ohms. The output of the program should have an appropriate title which identifies the program and include your name, followed by a Table (a list) with the values of voltages used and the values of the calculated powers. Draw a flowchart. 1/2015
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
