Language: JavaScript
Answer:
let num = [10,20,30];
average(num);
function average(num) {
let sum = 0;
for(let i in num) {
sum += num[i];
}
return console.log(sum/num.length);
}
Answer and Explanation:
Using Javascript programming language, to write this script we define a function that checks for empty variables with if...else statements and then uses a for loop to loop through all arguments passed to the function's parameters and print them out to the console.
function Check_Arguments(a,b,c){
var ourArguments= [];
if(a){
ourArguments.push(a);}
else( console.log("no argument for a"); )
if(b){
ourArguments.push(b);}
else( console.log("no argument for b"); )
if(c){
ourArguments.push(c);}
else( console.log("no argument for c"); )
for(var i=0; i<ourArguments.length; i++){
Console.log(ourArguments[i]);
}
}
What are your answer choices?
Answer:
False.
Explanation:
The statement #include<math.h> means it is telling the compiler to include the the C language library math.h. It contains different math mathematical functions such as pow,ceil,floor,log,log10 etc.
#include is a preprocessor directive and it is used to paste the code the file that is provided in the #include to the current file.
Ddddddddddddddddddddddddddddddddddddddddd