1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Sedaia [141]
3 years ago
15

Code is the code or instructions used to create a Web page or program.

Computers and Technology
1 answer:
Paha777 [63]3 years ago
5 0
Answer:
HTML
Explanation:

You might be interested in
3. (20 points) Write a C++ recursive function that finds the maximum value in an array (or vector) of integers without using any
Luden [163]

Answer:

Following are the code to this question:

In option (i):

#include <iostream>//defining header file

using namespace std;

int findMax(int B[], int x)//defining recursive method findMax

{

if (x == 1)//defining condition when value of n==1

return B[0];//return array first element

return max(B[x-1], findMax(B, x-1)); // calling recursive method inside max method and return value

}

int main() //defining main method  

{

int B[] = {12, 24, 55, 60, 50, 30, 29};//defining array B

int x= 7;//defining integer variable and assign a value

cout << "Maximum element value of the array is: "<<findMax(B, x)<<endl;//calling method findMax and print value

return 0;

}

Output:

Maximum element value of the array is: 60

In option (ii):

\Rightarrow \ T(n) = 1 + T(n-1)\\\Rightarrow  1 + 1 + T(n-2)\\ \Rightarrow  1 + 1 + 1 + ... n \ times \\\Rightarrow  O(n) \\

Explanation:

In the above-given program a recursive method "findMax" is defined, which accepts an array "B" and an integer variable "n" in its parameter, inside the method a conditional statement is used that, checks value of x equal to 1.

  • If the above condition is true it will return the first element of the array and find the max number.
  • Inside the main method, an array B is declared that assigns some values and an integer variable is declared, that also assigns some values, in the last step print method is used that pass value in method and prints its return value.
  • In the option (ii) we calculate the Big-O notation algorithm value.
5 0
4 years ago
Write a method called consecutive that accepts three integers as parameters and returns true if they are three consecutive numbe
Andre45 [30]

Answer:

#include <iostream>

using namespace std;

void swap(int *a,int *b)

{

   int temp;

   temp=*a;

   *a=*b;

   *b=temp;

}

bool consecutive(int k1,int k2,int k3)

{

   int arr[]={k1,k2,k3};  //storing these variables into an array

   int i,j;

   for(i=0;i<3;i++)

   {

       for(j=i;j<3;j++)

       {

           if(arr[i]>arr[j])

           {

               swap(arr[i],arr[j]);  //swapping to sort these numbers

           }

       }

   }

   if((arr[1]==arr[0]+1)&&(arr[2]==arr[0]+2))  //checks if consecutive

       return true;

   else

       return false;

}

int main()

{

   int result=consecutive(6,4,5);   //storing in a result variable

   if(result==0)

       cout<<"false";

   else

       cout<<"true";

   return 0;

}

OUTPUT :

true

Explanation:

In the above code, it stores three elements into an array and then sorts the array in which it calls a method swap() which is also defined and interchanges values of 2 variables. Then after sorting these numbers in ascending order , it checks if numbers are consecutive or not, if it is true, it returns true otherwise it return false.

7 0
3 years ago
Pls help!!
alexira [117]

Answer:

4.24

Explanation:

First you find the mean of the data set, which is 7. Then to find standard deviation you have to follow the formula which tells you to subtract the mean from each number under the square root : √(2 - 7)^2 + (9 - 7)^2 + (10 - 7)^2 + (4 - 7)^2 + (8 - 7)^2 + (4 - 7)^2 + (12 - 7). Once you solve the parenthesis you square it, once you square it the negatives won't matter. That will leave you with this : √(25 + 4 + 9 + 9 + 25). The formula tells you to find the sum of those numbers (which is 72) then subtract one from how many numbers there are, 5 - 1 = 4, and divide your sum by that number. So 72 / 4 = 18. Then you find the square root of 18 and that becomes your answer.

7 0
2 years ago
package dataStructures; /** * Class OrderedLinkedList. * * This class functions as a linked list, but ensures items are stored i
valkas [14]

Answer:

?

Explanation:

8 0
4 years ago
The scope of a variable declared in a for loop's initialization expression always extends beyond the body of the loop
shtirl [24]

Answer:

False

Explanation:

for loop is used to run the statement again and again until the condition put inside the for loop is false.

syntax:

for(initialization;condition;increment/decrement)

{

  statement;

}

the initialization scope is valid only within the curly braces of the for loop. it is not valid outside the body of the for loop.

because initialization is the part of the for loop.

4 0
3 years ago
Other questions:
  • In a particular factory, a team leader is an hourly paid production worker who leads a small team. In addition to hourly pay, te
    15·1 answer
  • Janae started an essay on the computer at school. She would like to work on it when she gets home, but she does not have a flash
    7·2 answers
  • In excel, you cannot format an entire column at once. true or false
    7·1 answer
  • What are the advantages of upgrading computer hardware?
    13·2 answers
  • The following is the pseudocode for which type of algorithm? For maxElement = each subscript in the array, from the last to the
    14·1 answer
  • What are three to five (3-5) key differences and features in Windows Server 2016 versus 2012?
    14·1 answer
  • What column, row, and text formatting issues are important when designing tables and lists?
    9·1 answer
  • Please tell me which ones go into which categories no files!!
    11·1 answer
  • Relieved to have survived ,henry rolled off the rink________.giving alex a grateful look
    8·1 answer
  • Which of the following is not a reason to choose a community college?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!