Answer:
Role of websites in internet
Importance of internet in our daily life
Answer:
Here is the C++ program:
#include<iostream> //to use input output functions
#include<iomanip> //to use setprecision
using namespace std; //to identify objects cin cout
int main() { //start of main function
int n1, n2, n3, n4, n5, n6, n7, min, max; // declare variables for 7 numbers, minimum value and maximum value
double sum= 0; //declare variable to hold sum of 7 numbers
double average; //declare variable to hold average of 7 numbers
cout<<"Enter first number: "; //prompts user to enter 1st number
cin>>n1; //reads first number from user
max = n1; //sets the first number to maximum
min=n1; //sets the first number to minimum
cout<<"Enter second number: "; //prompts user to enter 2nd number
cin>>n2; //reads second number from user
if(n2<min){ //if second number is less than min
min=n2; } //sets min to n2
if(n2>max){ //if n2 is greater than max
max = n2; } //sets max to n2
cout<<"Enter third number: "; //prompts user to enter 3rd number
cin>>n3; //reads third number from user
if(n3<min){ //checks if n3 is greater than min
min=n3; } //sets n3 to min
if(n3>max){ //checks if n3 is greater than max
max = n3; } //sets max to n3
cout<<"Enter fourth number: ";//prompts user to enter 4th number
cin>>n4; //reads fourth number from user
if(n4<min){ //if n4 is less than min
min=n4; } //sets min to n4
if(n4>max){ //if n4 is greater than max
max = n4; } //sets max to n4
cout<<"Enter fifth number: "; //prompts user to enter 5th number
cin>>n5; //reads fifth number from user
if(n5<min){ //if n5 is less than min
min=n5; } //sets min to n5
if(n5>max){ //if n5 is greater than max
max = n5; } //sets max to n5
cout<<"Enter sixth number: "; //prompts user to enter 6th number
cin>>n6; //reads sixth number from user
if(n6<min){ // if n6 is less than min
min=n6; } //sets min to n6
if(n6>max){ //if n6 is greater than max
max = n6; } //sets max to n6
cout<<"Enter seventh number: ";//prompts user to enter 7th number
cin>>n7; //reads seventh number from user
if(n7<min){ //if n7 is less than minimum number
min=n7; } //assigns n7 to min
if(n7>max){ //if n7 is greater than the maximum number
max = n7; } //assigns n7 to max
sum = n1+n2+n3+n4+n5+n6+n7; //adds 7 numbers
average = sum/7; //computes average of 7 numbers
cout<<"The average is: "<<fixed<<setprecision(3)<<average<<endl; //displays average value up to show 3 digits below decimal point using setprecision method of iomanip library
cout<<"The maximum number is: "<<max<<endl; //displays maximum number of 7 numbers
cout<<"The minimum number is: "<<min<<endl; //displays miimum number of 7 numbers
return 0; }
Explanation:
The program is well explained in the comments attached to each statement of program. For example if
n1 = 3
n2 = 9
n3 = 7
n4 = 6
n5 = 2
n6 = 5
n7 = 4
When n1 is read using cin then this number is set to max and min as:
min = 9
max = 3
Now when n2 is read, the first if condition checks if n2 is less than min and second if condition checks if n2 is greater than max. As n2 = 9 so it is not less than min so this if condition is false and n2 is greater than max i.e. 3 so this condition is true. So 9 is assigned to max.
min = 9
max = 9
Now when n3 is read the values of min and max become:
min = 7
max = 9
Now when n4 is read the values of min and max become:
min = 6
max = 9
Now when n5 is read the values of min and max become:
min = 2
max = 9
Now when n6 is read the values of min and max become:
min = 2
max = 9
Now when n7 is read the values of min and max become:
min = 2
max = 9
Now the statement sum = n1+n2+n3+n4+n5+n6+n7;
executes which becomes:
sum = 3 + 9 + 7 + 6 + 2 + 5 + 4
sum = 36.0
Next program control moves to statement:
average = sum/7;
this becomes
average = 36/7
5.142857
Since this is to be displayed up to 3 decimal places so average = 5.143
the complete output of the program is attached.
Answer:
To edit an existing pattern, double-click the pattern in the pattern swatch, or select an object containing the pattern and choose Object > Pattern > Edit Pattern
Answer: Exception
Explanation: A throw statement is a statement that whenever it gets executed ,it stops the flow of the execution immediately. The throw statement has a throw keyword for stopping of the execution which is denoted as the exception. A checked or unchecked exception can only be thrown. The compiler of a program has the function of giving warning if there are chances of exception.
Answer: The address of the cell is C2
Explanation:
In a worksheet like Microsoft Excel, there are rows and columns. It tags rows with numbers and tags columns with alphabet letters. For example, the first row is 1, the second row is 2, the third row is 3, and so on. Similarly, the first column is A, the second column is B and so on.
We want to know the address for the intersect of the second row i.e. 2, and the third column i.e. C in a worksheet. In other words, it might intersect column C and row 2.
A cell is a box where a row and column intersect. The address of the cell starts with the column, and next there is the row. In that case, we can conclude that the address of the cell is C2.
C2 or B3. This is if you are talking about Microsoft Excel.
Answer:
Copyright is a type of intellectual property that gives its owner the exclusive right to make copies of a creative work.
Explanation:
Answer:
The formula is =OFFSET( A1, 7,3,1,1 )
Explanation:
Microsoft excel is a statistical and analytical tool for data management and analysis. Its working environment is called a worksheet. The worksheets are made up of rows and columns also known as records and fields respectively.
Functions like OFFSET in excel is used to return a cell or group of cells. It gets the position to turn by start getting a starting port, then the number of records below it and the fields after, then the length and width of cells to return.
syntax: =OFFSET( "starting cell", "number of rows below", "number of columns after", "height of cells to return", "width of cells to return" )