1 2 3 4 5 6 7 8 9 10 11 12
clear //Given C1=5 //micro F C2=6 //micro F V=10 //V //Calculation Cp=C1+C2 q=Cp*V //Result printf("\n Charge supplied by battery is %0.3f micro F", q)