Answer:
Following are the code in c language
#include <stdio.h> // header file
int main() // main function
{
int n1,i;
float avg,x,s=0; // variable declaration
printf("\nEnter How many Number terms you want:");
scanf("%d",&n1); // input terms by user
for(i=0;i<n1;++i)
{
scanf("%f",&x); // user input
s= s +x; //calculate sum
}
avg = s/n1;// calculate average of n number
printf("\nThe average of n number is:");
printf("%f",avg); // display average
return 0;
}
Output
Enter How many Number terms you want:3
3
4
3
The average of n number is:3.333333
Answer:
The answer to this question is given below in the explanation section. However, the correct option is B. i.e a for loop.
Explanation:
The correct answer to this question is for-loop. Beause, in the for loop is written to perform a certain number of iterations or to iterate until a specific result is achieved.
for example, to calculate the average of 10 numbers, we use the for loop to iterate statements written in its body 10 times to calculate the average.
when the specific numbers of the iteration are reached it will get terminated.
for example
for (int i=0; i<=10; i++)
{
// perfrom average, code
}
this loop iterate 10 times or less, when it reached above the limit it gets stopped.
however, the other options are not correct, because an ordered data structure is like a list of order data, print function print something to the user or on screen. while an array is like a list of data of the same data type.
Answer:
B. the main work area of a Mac
Answer: FORTRAN
Explanation: FORTRAN (FORmula TRANslator) was a amongst the first general purpose high-level programming language. It was particularly made for the numeric operation and scientific purpose. Therefore , it had no feature related to the interactive website designing because it served the purpose for computing the operations like scientific calculations etc. Thus , the correct option is FORTRAN.