Write a program to compute the total power generated by a klink circuits, where the N is entered by the user, for each circuit ask for the input phase angle, compute the power and add that power to the total, each time you ask the user to enter the phrase angle, if the user does not enter a number between 0 and 90 display an error message and ask them again until they enter a valid if the entry is not valid, then do not compute the power and do not count that as one of the N circuits, also check for a positive number for the N – the number for circuits. Display the total power(and do not display the cumulative total after each circuit)

The power generated by a klink circuits is…
P=Kcos(aπ/180)

Where
p = power(killowats, k W)
K = Klinks constant (5/7)
a = phase angle (in degrees)
π = PI (3.14159…)

Sample Solution

This question has been answered.

Get Answer