Курсовая работа: Давачі наближення
scanf( "%lf", &tImp );
printf( "Enter impulses period: ");
scanf( "%lf", &T );
printf( "Enter output impulse length: ");
scanf( "%lf", &tZv );
double r5 = ( inpVolt - 3.5 ) / iImp;
printf( "R5 = %.3lf Ohm\n", r5 );
double r3 = 10 * pow( 10, 3 );
double c2 = 1000 * pow( 10, -12 );
findRC( r3, c2, tImp / 0.7 );
printf( "R3 = %.2e Ohm, C2 = %.2e Farad\n", r3, c2 );
double r2 = 300 * pow( 10, 6 );
double c1 = 0.047 * pow( 10, -6 );
findRC( r2, c1, T / 1.4 );
printf( "R2 = %.2e Ohm, C1 = %.2e Farad\n", r2, c1 );
double r8 = 300 * pow( 10, 6 );
double c7 = 0.047 * pow( 10, -6 );
findRC( r8, c7, tZv / 0.7 );
printf( "R8 = %.2e Ohm, C7 = %.2e Farad\n", r8, c7 );
printf( "\n TESTING:\n" );
printf( "Iimp = (V - 3.5) / R5 = ( %.2e - 3.5 ) / %.2e = %.2e\n", inpVolt, r5, ( inpVolt - 3.5 ) / r5 );
printf( "timp = 0.7*R3*C2 = 0.7 * %.2e * %.2e = %.2e\n", r3, c2, 0.7 * r3 * c2 );
printf( "T = 1.4*R2*C1 = 0.7 * %.2e * %.2e = %.2e\n", r2, c1, 1.4 * r2 * c1 );
printf( "Tzv = 0.7*R8*C7 = 0.7 * %.2e * %.2e = %.2e\n", r8, c7, 0.7 * r8 * c7 );
while( kbhit( ) )
{
getche( );
}
printf( "\nDo you want to repeat calculation (y/n)? " );