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 + y2 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

1 Expert Approved Answer
Step: 1 Unlock

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

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Computer Network Questions!