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 ways to add a photograph to a slide is given below: What to write when composing the email is also given below.
<h3>How do you Insert photos into a slide?</h3>
The steps are given below?\
- The first thing to do is to open the slide you want to insert the image on.
- then click on Insert menu, and take the cursor to the Picture, and then one can click Photo Browser or insert pictures.
- Then select the picture that you want and and one can drag it onto the slide.
Note that it is essential to follow the steps and one can add as many pictures as they want to their slides.
Learn more about e-mail from
brainly.com/question/24506250
#SPJ1
Answer:
on the first empty cell to the right of the last cell containing a value.
Explanation:
The AutoSum function in excel gives a shortcut path to taking the sum of numeric values in a row or column of data. The Autosum uses the sum function to take the addition of all the desired rows or columns values without needing to make a manual highlight of the data. To use AutoSum with a row of 4 values, the cursor must be placed immediately at the cell next 4th row cell containing a value. This is equivalent to the first empty cell to the right of the last cell containing a value, then autosum is clicked in the home tab and all 4 cells will be highlighted as it uses the sum function to calculate the sun of the 4 row values.
Answer:
A diagram showing the relation between variable quantities, typically of two variables, each measured along one of a pair of axes at right angles. A collection of points whose coordinates satisfy a given relation. A sheet of information in the form of a table, graph, or diagram. Normally graphs and charts in excel are very much similar to each other, but they are different, Graphs are mostly a numerical representation of data as it shows the relation of change in numbers that how one number is affecting or changing another, however, charts are the visual representation where categories may or may not be related to each other also how the information is displayed is different in both graphs and charts.