this will be very simple for most of you i am guessing but for some reason, when trying to get my numbers to the power of 0.5 (on line 41) it says i have too many functions, what does this mean and how do i stop this?
insert
Code:
#include <stdio.h>
#include <math.h>
void scroll(int);
void itemunbalancedpi(void);
char choice;
int done=1;
float Z1;
float Z2;
float LOSS;
float R1;
float R2;
float R3;
float N;
float L;
int main(void) {
do {
system ("cls");
printf("Main Menu\n\n");
printf("C: Unbalanced pi\n");
printf("Q: Quit the program\n");
printf("\n\n Choose option A, B,C,D or E ");
fflush(stdin);
choice= getchar();
switch(choice) {
case 'C': {itemunbalancedpi();;break;}
case 'Q': {done=0;break;}
}
}while(done !=0);
}
void itemunbalancedpi() {
printf("Please enter Z1 value \n");
scanf("%f", &Z1);
printf("Please enter Z2 value \n");
scanf("%f", &Z2);
printf("Please enter LOSS value \n");
scanf("%f", &LOSS);
L=LOSS/10;
N=pow(10.0,L);
printf("%f, is the noise\n N \n",N);
R3=((N-1)/2)*(pow((Z1*Z2)/N),(0.5));
printf("%f, Ohms for R3\n", R3);
do {
printf("D: Enter D to discard values?\n");
/*make a save point in here*/
fflush(stdin);
choice= getchar();
switch(choice) {
case 'D': {done=0;main();break;}
}
}while(done !=0);
}
insert