homework5-godara

homework5-godara - Tanuj Godara 9052-79307 Problem Solving...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Tanuj Godara 9052-79307 Problem Solving with C++ Due date: 2/21/10 by 11:55PM This assignment is to be done individually Work these exercises at home. 1. Do problem 9 on page 129. #include <iostream> #include <cmath> #include <iomanip> using namespace std; void main() { double resistor1; double resistor2; double resistor3; double combined; cout << "Enter the Resistance in Ohms of your three resistors: " << endl; cin >> resistor1; cin >> resistor2; cin >> resistor3; combined = (1/((1/resistor1)+(1/resistor2)+(1/resistor3))); cout << "The Combined resistance is: " << setw(7) << fixed << setprecision(2) << combined << " Ohms." << endl; } 2. Repeat problem 1 above using resistance values for R 1 = 10, 100, 1000, 10000, 10000. Describe the difference in the overall combined resistance as R 1 increases. The overall resistance increases as R1 increases. R1 R2 R3 Total 10 1000 1000 9.80 100 1000 1000 83.33 1000 1000 1000 333.33 10000 1000 1000 476.19 100000 1000 1000 497.51 3. Do problem 9 on page 172 using the following values. Be sure to use a nested
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/14/2010 for the course COMM 2064 taught by Professor Jimkuypers during the Spring '08 term at Virginia Tech.

Page1 / 4

homework5-godara - Tanuj Godara 9052-79307 Problem Solving...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online