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;
}
{{5,10,15,20},{25,30,35,40}} is answer where zero is not found.
<u>Explanation:</u>
This program finds zero in giving as arrays of value as a parameter. The program has two loop. One is a row of the array and the other is column loop for each row o an array. For loop is created with a variable namer row and the loop ends with a length of the array of each row.
In side row for loop col loop is created and loop ends with each row-column length of cells. If data in each cell i.e (row, col) calue is zero it returns true and the loop is terminated immediately.
In case if the value of the cell doesn’t found zero it never terminates the loop and continuous loop and returns a false value. Find Zero functions accept the two-dimensional array and check whether cell value is zero. If it is zero found return true otherwise it returns false.
Answer:
Odd question but okay....
Explanation:
Earth's surface, also known as "Land", has very many biotic(animals) and abiotic factors (plants). There are also a wide variety of land features such as mountain, plains, Hills, etc..
Within these features are small - Large ecosystems we're plants and animals thrive to create a bigger and stronger wildlife.
"Land" is a very simple word that stands for all of the different plants, mammals, ecosystems, aquatic animals and many more ways of life on Land.
I hope this helps...
1. Less picture less distraction, but where to put pictures ? At the start of your presentation just to initially get the attention of the audience.
2. Use bullets for texts, never use paragraphs. Use short text or even words only which captures the subject of the presentation.
3. In conjunction with point 1. Use less animations as well. Especially for formal presentations
Additionally : Make sure to know your audience, for professionals, make the presentations short and precise. For much informal audiences you can be playful but always keep in mind not to overshadow the attention from the speaker.
A) operating system
It is going to let you "operate" it using the mouse and keyboard