write program that calculate voltage,current and resistance
It is not stated which language to use for the program. Hence, MATLAB is used.
Also, without any other information, the Ohm's law is shown in the program which can calculate voltage when current and resistance are input.
clc;
clear;
i = input("Input current value in amphere");
r = input("Input resistance value in ohms");
v = i*r;
fprintf("The voltage is %f volts",v);
Output:
Input current value in amphere
0.01
Input resistance value in ohms
10
The voltage is 0.100000 volts
Get Answers For Free
Most questions answered within 1 hours.