When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.
23 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.
#include <stdio.h>
int main(void)
{
float area = 0.0f;
float length = 0.0f;
printf("What is the ellipse's area? ");
scanf("%f", &area);
printf("What is the length of one of the ellipse's axes? ");
scanf("%f", &length);
const float PI = 3.14159f;
float area_2 = PI * area * length;
printf("\nThe ellipse's other axis is: %.2f", area_2);
return 0;
}
Can someone tell me what I did wrong and how can I fix the problem?
You're misreading the instructions.
#c-help-text message
How do I calculate the length of the other axis tho?
look down
look two lines below where it mentions pi
the wording of this problem is kinda problematic though
it asks for the other axis without specifying if it's the semi major axis or semi minor axis that it wants you to find
but with the equation they provided it's clear they want the semi major axis 
actually it wouldn't matter but still
#include <stdio.h>
int main(void)
{
float area = 0.0f;
float length = 0.0f;
printf("What is the ellipse's area\? ");
scanf("%f", &area);
printf("What is the length of one of the ellipse's axes\? ");
scanf("%f", &length);
const float PI = 3.14159f;
float a = area / (PI * length);
printf("\nThe ellipse's other axis is: %.2f", a);
return 0;
}
like this, aye?
I dont see how its problematic it clearly states at the beginning what you have to do, provides a related formula, then provides the actual formula
problematic at first glance*
maybe not for you, but it was for me upon first reading it
So read it again
it's done now...
This advice goes beyond just this specific instance
not helpful advice then