series of R

series of R - float rs,rt=0.0,r1=6.0,rl=3.0,r2=9.0 for(int...

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<3;i++) { rs=ser(rl,r1); cout<<"r ser = "<<rs<<" "; rl=par(rs,r2); cout<<"rt par="<<rl<<endl; } cout<<ser(r1,rl)<<endl; }...
View Full Document

This note was uploaded on 10/16/2010 for the course ENG 2266e taught by Professor Aliraqi during the Spring '10 term at 4.1.

Ask a homework question - tutors are online