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
icang [17]
2 years ago
14

Write a C++ function using recursion that returns the Greatest Common Divisor of two integers. The greatest common divisor (gcd)

of two integers, which are not zero, is the largest positive integer that divides each of the integers. For example, the god of 8 and 12 is 4.
Computers and Technology
1 answer:
kifflom [539]2 years ago
8 0

Answer:

The function is as follows:

int gcd(int num1, int num2){

   if (num2 != 0){

      return gcd(num2, num1 % num2);}

   else {

      return num1;}

}

Explanation:

This defines the function

int gcd(int num1, int num2){

This is repeated while num2 is not 2

   if (num2 != 0){

This calls the function recursively

      return gcd(num2, num1 % num2);}

When num2 is 0

   else {

This returns the num1 as the gcd

      return num1;}

}

You might be interested in
John is considering his STEM education choices. He wants to begin working in the technology field as soon as possible.
wariber [46]

Answer:

The answer to this question is given below in the explanation section.

Explanation:

STEM is a curriculum based on the idea of educating students in four specific disciplines — science, technology, engineering,  and mathematics — in an interdisciplinary and applied approach. The students who graduated in STEM-based education getting more paid and jobs than students who did not study the STEM-based education.

As in this question that John is considering his STEM education choices, and he wants to begin working in the technology field as soon as possible. He should pursue bachelor (graduate) degree in technology. Because after, passing out, he can begin working in technology easily.

5 0
3 years ago
In Online Data Extraction data is extracteddirectly from the ------ system itself.o Hosto Destinationo Sourceo Terminal
barxatty [35]

Answer:

system itself.

Explanation:

In Online Data Extraction data is extracted directly from the system itself.

4 0
3 years ago
Traceability of requirements is helpful in the followingexcept
larisa86 [58]

Answer: D)  Identifying GUI's for a particular requirement

Explanation:

 Traceability of requirements is helpful except identifying GUI's for a particular requirements as, traceability in project management describe the relationships between two or more element throughout in the development process and outline the relationship between the customer requirement by traceability matrix. And the requirement of traceability is so important because it creating a downstream flow of software and test cases in software requirement but not helpful in GUI identification.

6 0
3 years ago
Which number is the decimal equivalent of 1100110 – 101101?
erastovalidia [21]

1100110-101101 = 111001 = 57

3 0
3 years ago
Read 2 more answers
40 points to answer ALL
Kamila [148]

Answer:

#1 Use case diagram is one of them and its specific purpose is to gather system requirements and actors. Use case diagrams specify the events of a system and their flows.

#2 Software architecture refers to the high level structures of a software system and the discipline of creating such structures and systems. Each structure comprises software elements, relations among them, and properties of both elements and relations.

#3 Definition. A programming paradigm is a style, or “way,” of programming. Some languages make it easy to write in some paradigms but not others. Never use the phrase “programming language paradigm.” A paradigm is a way of doing something (like programming), not a concrete thing (like a language).

#4 Object-oriented programming (OOP) refers to a type of computer programming (software design) in which programmers define not only the data type of a data structure, but also the types of operations (functions) that can be applied to the data structure.

#5 Each flow chart is concerned with one particular process or system. ... Flow charts are an important tool for the improvement of processes. By providing a graphical representation, they help project teams to identify the different elements of a process and understand the interrelationships among the various steps.

#1 Programming style, also known as code style, is a set of rules or guidelines used when writing the source code for a computer program. It is often claimed that following a particular programming style will help programmers read and understand source code conforming to the style, and help to avoid introducing errors.

#2 Version control is a system that records changes to a file or set of files over time so that you can recall specific versions later. For the examples in this book, you will use software source code as the files being version controlled, though in reality you can do this with nearly any type of file on a computer.

#3 a manual detailing the house style of a particular publisher, publication, etc.

#4 Agile software development is a process that turns a vision for a business need into solutions. We use agile because it results in software that better supports our customer needs on a faster timeline.” The Agile movement is based on the overarching goal of building software more simply.

Explanation:

20 points not 40 i need the rest

5 0
3 years ago
Read 2 more answers
Other questions:
  • Suppose a computer can execute 1 billion instructions/sec and that a system call takes 1000 instructions, including the trap and
    10·1 answer
  • GenXTech is a growing company that develops gaming applications for military simulations and commercial clients. As part of its
    9·1 answer
  • Write a class called Line that represents a line segment between two Points. Your Line objects should have the following methods
    8·1 answer
  • You are a desktop administrator for nutex corporation. Your organization uses ethernet cable to connect network resources. A use
    14·1 answer
  • What is one effective way for employees to keep their skillsets current?
    8·2 answers
  • All computer systems have
    14·2 answers
  • I need help with this question. its in the photo
    10·1 answer
  • We cannot imagine a life without the Internet. Imagine that you had to live without being connected to the Internet. Discuss the
    13·1 answer
  • Which digital cellular standard is used widely throughout the world except the united states?
    6·1 answer
  • Which response best completes the following IF-ELSE statement?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!