Answer to Question #34777 in C++ for Tawanna
2013-09-03T23:57:55-04:00
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);
}
}
1
2013-10-02T09:09:38-0400
The answer to the question is available in the PDF file https://assignmentexpert.com/https://assignmentexpert.com/homework-answers/programming-answer-34777.pdf
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 !
Learn more about our help with Assignments:
C++
Comments
Leave a comment