blob: 92d5e382795222e267dfcc3470faae526d67fd80 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
clear//
//Variables
W = 75.0 //Work done (in Joules)
Q = 50.0 //Charge produced (in Coulomb)
//Calculation
V = W/Q //Voltage between battery terminals (in Volts)
//Result
printf("\n Terminal voltage of a battery is %0.3f V.",V)
|