Question: 1) Write a function named func() which has 4 double parameters x, y, n1 and n2. It calculates k = x1 + yn2 and
1) Write a function named func() which has 4 double parameters x, y, n1 and n2. It calculates k = x1 + yn2 and returns k which is a double value. Then, write a main program main() which reads two real numbers a and b and calls func() to calculate, m = (a +b)/(a+b). m must be a double variable. At the end of the program, m must be printed.
Step by Step Solution
There are 3 Steps involved in it
def funcx y n1 n2 k x n1 y n2 return k def main a floatinputEnter the value of a b floatinputE... View full answer
Get step-by-step solutions from verified subject matter experts
