Answer:
Explanation:
1. Write a program that declares an array named alpha with 50 components of the type double. Initialize the array so that the first 25 components are equal to the square of the counter (or index) variable and the last 25 components are equal to three times the index variable.
double alpha[50];
for (int i=0;i<25;i++)
{
alpha[i]=i*i;
alpha[i+25]=(i+25)*3;
}
2. Output the array so that exactly ten elements per line are printed.
for (int i=0;i<50;i++)
{
cout<<i+1<<". "<<alpha[i]<<" ";
if (((i+1)%10)==0)
{
cout<<endl;
}
}
3. Run your program again, but this time change the code so that the array is filled with random numbers between 1 and 100.
double alpha[50];
for (int i=0;i<50;i++)
{
alpha[i]=rand()%101;
}
for (int i=0;i<50;i++)
{
cout<<i+1<<". "<<alpha[i]<<" ";
if (((i+1)%10)==0)
{
cout<<endl;
}
}
4. Write the code that computes and prints the average of elements of the array.
double alpha[50],temp=0;
for (int i=0;i<50;i++)
{
alpha[i]=rand()%101;
temp+=alpha[i];
}
cout<<"Average :"<<(temp/50);
5. Write the code that that prints out how many of the elements are EXACTLY equal to 100.
double alpha[50],temp=0;
for (int i=0;i<50;i++)
{
alpha[i]=rand()%101;
if(alpha[i]==100)
{
temp++;
}
}
cout<<"Elements Exacctly 100 :"<<temp;
Please note: If you put each of above code to the place below comment it will run perfectly after compiling
#include <iostream>
using namespace std;
int main()
{
// If you put each of above code here it will run perfectly after compiling
return 0;
}
The highest amount is Credit. The more you wait the higher the interest, higher the interest the more you pay, and no one wants to play more. Stay safe use debit as much as you can
Question:the music is the soul who says this
Answer: Arthur Schopenhauer
Explanation: he says music is the language of feeling and of passion
question answered by
(jacemorris04)
Answer:
to count the number of cases that fall into different subgroups within a dataset.
Explanation:
To calculate the frequency within the dataset means to count the number of times that item or condition on which we are checking the column within the dataset is true or the frequency of the case that is coming into different subgroups.
Hence the answer of this question is third option given in the question.
Answer: Clients
Explanation:
A Client refers to a computer that is able to connect to a server usually in a network in order to access the services provided by that server.
When a user tries to access the internet, the Client accesses the relevant server and requests the information that the user is requesting. The server then sends this to the client which then formats it in the way that the user can understand. The client is thus the direct connection to the internet.