65 767
Assignments Done
99,4%
Successfully Done
In October 2018

Answer to Question #34777 in C++ for Tawanna

Question #34777
I keep getting an error in my program:
#include< stdio.h >

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)

{

R=distance*r;

i=power/v1;

double powerloss=(i*i)*R;

printf(" \nPower loss at %d distance is%f",distance,powerloss);

}

printf("\nPower loss at 200v");

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

{

R=distance*r;

i=power/v1;

double powerloss=(i*i)*R;

printf(" \nPower loss at %d distance is%f",distance,powerloss);

}

}
Expert's answer

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions