3,0 1.5 4.1 3.0 Exercise 1: If the file circuit.txt contains the following data 2.1 1.1 2.6 13 2 12 2 10 50 7 21 1.7 Vol

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

3,0 1.5 4.1 3.0 Exercise 1: If the file circuit.txt contains the following data 2.1 1.1 2.6 13 2 12 2 10 50 7 21 1.7 Vol

Post by answerhappygod »

3 0 1 5 4 1 3 0 Exercise 1 If The File Circuit Txt Contains The Following Data 2 1 1 1 2 6 13 2 12 2 10 50 7 21 1 7 Vol 1
3 0 1 5 4 1 3 0 Exercise 1 If The File Circuit Txt Contains The Following Data 2 1 1 1 2 6 13 2 12 2 10 50 7 21 1 7 Vol 1 (42.61 KiB) Viewed 38 times
3 0 1 5 4 1 3 0 Exercise 1 If The File Circuit Txt Contains The Following Data 2 1 1 1 2 6 13 2 12 2 10 50 7 21 1 7 Vol 2
3 0 1 5 4 1 3 0 Exercise 1 If The File Circuit Txt Contains The Following Data 2 1 1 1 2 6 13 2 12 2 10 50 7 21 1 7 Vol 2 (37.71 KiB) Viewed 38 times
3,0 1.5 4.1 3.0 Exercise 1: If the file circuit.txt contains the following data 2.1 1.1 2.6 13 2 12 2 10 50 7 21 1.7 Voltage Current Power 3.0 2.1 (result) 1.5 (result) 2.6 4.1 (result) 13 3.0 H (result) (result) (result) 1.1 The first column is voltage and the second column is the electric current. Write program that reads the voltages and currents then calculates the electric power (P) based on the equation: P=y* i (if either i or v is greater than 10, Power=Letter H) Write your output to the file results.txt (the file should look like the one above) with voltage in the first, current in the second and power on the third column. Use eof function.

15000 16500 14600 15000 16500 14600 15000 16500 14600 15000 16500 14600 15000 16500 14600 15000 16500 14600 15000 16500 14600 15000 16500 14600 15000 16500 14600 0.08 0.095 0.10 0.082 0.095 0.70 0.08 0.095 0.20 0.08 0.095 0.10 0.082 0.095 0.70 0.08 0.095 0.20 0.08 0.095 0.10 0.082 0.095 0.70 0.08 0.095 0.20 5 4 6 5 4 7 5 7 6 5 4 6 5 4 7 5 7 6 5 4 6 5 4 7 5 7 6 0 0 0
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply