Question: I need to un-nest the void main(void) function from the int main. #include #include #include #include #include // the first rendition of this code i

I need to un-nest the void main(void) function from the int main.

#include #include #include #include #include // the first rendition of this code i focused on mainy int functions, // this caused issues with the overall ram usage // the TA responded quickly to my question and with a very informative tip // which leads to to belive changing from a int function focus to a // float function focus will fix my issues // major adjustments V2 changed all to floats adjusted the int main() { float n = 0.01; float power=0; float Rs=8,Ro=20,Vs=40; float Ps[200]; float i=0,j=0; float a; power= Rs*(pow( (n*Vs) / (Ro*pow(n,2)+Rs) , 2) ); for (n=0.01 ; n<=2 ; n+=0.01) {//sorts array of values of power float index =0; index = n*100; Ps[index] = power; return Ps; } void main (void) { float arr1[5] ={8,40,20}; for (float i=0.01; i<2.01; i=i+0.01) printf("maximum power is :%f" , Ps[199]); return 0; }}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!