Explore BrainMass

Calculating Power Loss using C Programming Language

A program to compute the power loss in a transmission line with a resistance of 0.05 ohms/mile. Compare the power loss if 500 kw of power is transmitted from a power generating station to cities at distances of 20, 30, 40, 50... 100 miles at 100 V and 200 V

The current I is calculated from

I = power transmitted in watts divided by volts transmitted
The total resistance R is computed from the equation:
Power loss = i² x R.

© BrainMass Inc. brainmass.com July 22, 2018, 10:51 am ad1c9bdddf

Solution Preview

Hi, I include my code as follows and my output after code.


void main()


double r=0.05;

int distance;

double R,i;

double power=500;

int v1=100,v2=200;

//calculating powerloss at v1=100

printf("nPower loss at 100v");

for(distance=20;distance <=100;distance=distance+10)



i=power/v1; ...

Solution Summary

The solution gives a complete c language code for calculating the power loss for which the formula is given in the question. The output is also given for reference.