1 2 3 4 5 6 7 8 9
clc clear //input v=14 //voltage //calculation v0=v*sqrt(2)//rms value //output printf("rms value of ac is 14 V") printf("\n the peak value of ac is %3.3f V",v0)