Sep 11, 2010

Eq.Resistances of Parrallel Combination

/***************************************

Program: Calculation of Eq.Resistances
of Parrallel Combination
Author : Vanangamudi

****************************************/


#include
#include

float eqr(float a[],int bound)
{     float r=0;
      for(int i=0;i
      {   r+= 1/a[i];  }          
      return(1/r); 
      }//eqr()
               
int main()
{   float a[10];
    int n,i;
   
    cout<<"Enter the number of resistors:";
    cin>>n;
   
    for(i=0;i
    {  cin>>a[i];  }   
    cout<<"EQR\t:"<
   
    getch();
   
}

0 comments:

Post a Comment

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | cheap international calls