1 2 3 4 5 6 7
//Ex:4.4 clc; clear; close; V_rms=240;//in Volts V_pk=1.414*V_rms; printf("Peak voltage of %d V RMS voltage = %f V",V_rms,V_pk);