//Chapter 10, Problem 12, figure 10.30 clc; rP1 = 3; // ratio of two powers rP2 = 20; // ratio of two powers rP3 = 400; // ratio of two powers rP4 = 1/20; // ratio of two powers //calculation: X1 = 10*log10(3) X2 = 10*log10(20) X3 = 10*log10(400) X4 = 10*log10(1/20) printf("\n\n (a)decibel power ratio for power ratio 3 = %.2f dB ",X1) printf("\n\n (b)decibel power ratio for power ratio 20 = %.1f dB ",X2) printf("\n\n (c)decibel power ratio for power ratio 400 = %.1f dB ",X3) printf("\n\n (d)decibel power ratio for power ratio 1/20 = %.1f dB ",X4)