series of R

series of R - { float rs,rt=0.0,r1=6.0,rl=3.0,r2=9.0;...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Q : writ c++ function and program to calculate Rt #include<iostream.h> #include<math.h> float ser(float r1,float r2) { return r1+r2; } float par(float r3,float r4) { return (r3*r4)/(r3+r4); } void main()
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: { float rs,rt=0.0,r1=6.0,rl=3.0,r2=9.0; for(int i=0;i&lt;3;i++) { rs=ser(rl,r1); cout&lt;&lt;&quot;r ser = &quot;&lt;&lt;rs&lt;&lt;&quot; &quot;; rl=par(rs,r2); cout&lt;&lt;&quot;rt par=&quot;&lt;&lt;rl&lt;&lt;endl; } cout&lt;&lt;ser(r1,rl)&lt;&lt;endl; }...
View Full Document

Ask a homework question - tutors are online