Question: Complete the following programs, and submit their code, as well as a description of their output. 1. // Problem 1 // Write a function, called

Complete the following programs, and submit their code, as well as a description of their output. 1. // Problem 1 // Write a function, called // average, that calculates // the average of four numbers function setup() \{ var ave = average (2,3,3,4); print("Answer is: " + ave); var a =5; var b 10; var c =15; var d =20; ave = average (a,b,c,d); print ("Answer is: " ave); print ("Answer is: " + \} average (1,7,2,6) ); // Write your average function definition // here
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
