Title: /*------------------------------------------------------ Student's Name: Colin Author: Fleshy Pastebin link: http://pastebin.com/06jZpw3n First Edit: Wednesday 27th of March 2013 08:31:21 PM CDT Last Edit: Wednesday 27th of March 2013 08:31:21 PM CDT /*------------------------------------------------------ Student's Name: Colin Joshua Fraser Student's email address: joshfraser91@gmail.com Lab group (CL/01, CL/02,...): CL/03 Purpose of this assignment: *To practice the use of C data types, variables, expressions and simple input/output.                             *To practice writing, compiling and running a simple C program. Purpose of this program: To calculate parameters of a common-emitter audio amplifier. -------------------------------------------------------*/   #include               /* give access to the stdio.h library*/   #define Vc 6.5                   /* definition of constants */ #define Ve 1.3 #define Ic 3*10^-3 #define Hfe 100   int main(void) {      float Vin;                   /* variable definition. range 0.01 - 0.05 (v)*/      float Vcc;                   /* variable definition. 9.0, 10.0 or 12.0 (v)*/      float Ib;                    /* variable definition: base current */      float R1;                    /* variable definition: resistors */      float R2;      float R3;      float R4;      float Vb;                    /* variable definition: base voltage */      float Ks;                    /* variable definition: Signal Amplification */      float Vout;                  /* variable definition: Output voltage */            printf("Enter the input voltage (range 0.01 - 0.05 (v): ");      scanf("%f",  &Vin );      printf("Enter the positive supply voltage (9.0, 10.0 or 12.0 (v): ");      scanf("%f",  &Vcc );            Ib = Ic/Hfe;                /* calculate the base current (A)*/      R1 = (Vcc - (float)Vc)/(float)Ic;          /* calculate resistance 1 (ohm) */      R2 = Ve / ((float)Ic + Ib);         /* calculate resistance 2 (ohm) */      Vb = Ve + 0.7;               /* calculate base voltage (v) */      R4 = Vb / (5 * Ib);          /* calculate resistance 4 (ohm) */      R3 = (Vcc - Vb)/(6 * Ib);    /* calculate resistance 3 (ohm) */      Ks = R2/R2;                  /* calculate Signal Amplification */      Vout = Vin * Ks;             /* calculate Output Signal (v) */        printf("========================");   /*line break */      printf("Resistors:);      printf("R1 =%10.1f \n" , R1);    /*display resistance 1 */        return 0; }