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
yan [13]
2 years ago
7

Write the definition of a function divide that takes four arguments and returns no value. The first two arguments are of type in

t. The last two arguments arguments are pointers to int and are set by the function to the quotient and remainder of dividing the first argument by the second argument. The function does not return a value.
Computers and Technology
1 answer:
jasenka [17]2 years ago
7 0

void divide (int x, int y, int*q, int*r)

{

*q = x / y;

*r = x % y;

}

You might be interested in
The statement which assigns value to variable is called a........................statement in c++
Helga [31]

Answer:

the statement which assigns value to variable is called <u>Assignment </u>statement in c++

Explanation:

Assignment Statement is the statement in C++ programming that is used to assign a constant value or some expression to the variable. Assignment operator is used to assign the value or expression to the variable.

Single equal (=) symbol is use as assignment operator in C++.

For Example

If we want to assign some value or expression in C++, it will be written as:

Variable = Value;

or

Variable = Expression;

Both of the above mentioned examples shows the Assignment Statements.

6 0
3 years ago
What is the relationship between data, information, business intelligence, and knowledge?
Tpy6a [65]

Answer:

The answer is below

Explanation:

Given the following:

Data is oftentimes described as actual truth or evidence about a situation or condition.

Information, on the other hand, is described as a refined data

Business Intelligence is defined as a combination of several information utilized in the decision-making process.

Knowledge is basically described as a form of intellectual properties, which encompasses a lot of experiences, skills, and creativity.

Therefore, the main relationship between all these is the utilization of these resources to enhance and improve the decision-making process. This is because, the gathered DATA is converted to INFORMATION, which in turn used to build BUSINESS INTELLIGENCE and finally, through the combination of past experiences, skills and talent, leads to a wealth of KNOWLEDGE to enhance and improve the decision-making process.

7 0
3 years ago
How exactly do you find the circumference by using C++ Programming? I really need a specific answer.
adelina 88 [10]

Answer:

C++ Program to Find Area and Circumference of a Circle

Area of Circle = PI X Radius X Radius. Where, Where PI is a constant which is equal to 22/7 or 3.141(approx)

Circumference or Circle = 2 X PI X Radius.

Circumference or Circle = PI X Diameter.

Explanation:

3 0
3 years ago
Describe two ways methods that cab be used to help stop hacking
mojhsa [17]

Answer:

Use a firewall

Install antivirus software.

Explanation:

7 0
2 years ago
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
Other questions:
  • Physical access, security bypass, and eavesdropping are examples of how access controls can be ________.
    15·1 answer
  • An operating system is an example of _______. The hard drive, keyboard and monitor are example of_______.​
    11·1 answer
  • How would this requirement be implemented?
    12·1 answer
  • What is a good technological design?
    13·1 answer
  • When you first launch the internet, what page will open?
    9·1 answer
  • 1. What does a network allow computers to share?
    13·1 answer
  • Write a recursive method that returns the number of 1’s in the binary representation of N. Use the fact that this is equal to th
    9·1 answer
  • What is the safest way to pay online​
    13·2 answers
  • X333: countElements Given an array of integers and an integer target, return a count of the number of times the target value occ
    6·1 answer
  • Ive already tried "word" and "star"
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!