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
cupoosta [38]
2 years ago
7

Q1) What would be the output of the program shown in the figure?

Computers and Technology
1 answer:
tensa zangetsu [6.8K]2 years ago
6 0

Answer:

23. Write a function named "g_c_d" that takes two positive integer arguments and returns as its value

the greatest common divisor of those two integers. If the function is passed an argument that is not

positive (i.e., greater than zero), then the function should return the value 0 as a sentinel value to

indicate that an error occurred. Thus, for example,

cout << g_c_d(40,50) << endl; // will print 10

cout << g_c_d(256,625) << endl; // will print 1

cout << g_c_d(42,6) << endl; // will print 6

cout << g_c_d(0,32) << endl; // will print 0 (even though 32

is the g.c.d.)

cout << g_c_d(10,-6) << endl; // will print 0 (even though 2 is

the g.c.d.)

24. A positive integer n is said to be prime (or, "a prime") if and only if n is greater than 1 and is

divisible only by 1 and n . For example, the integers 17 and 29 are prime, but 1 and 38 are not

prime. Write a function named "is_prime" that takes a positive integer argument and returns as its

value the integer 1 if the argument is prime and returns the integer 0 otherwise. Thus, for example,

cout << is_prime(19) << endl; // will print 1

cout << is_prime(1) << endl; // will print 0

cout << is_prime(51) << endl; // will print 0

cout << is_prime(-13) << endl; // will print 0

25. Write a function named "digit_name" that takes an integer argument in the range from 1 to 9 ,

inclusive, and prints the English name for that integer on the computer screen. No newline character

should be sent to the screen following the digit name. The function should not return a value. The

cursor should remain on the same line as the name that has been printed. If the argument is not in the

required range, then the function should print "digit error" without the quotation marks but followed by

the newline character. Thus, for example,

the statement digit_name(7); should print seven on the screen;

the statement digit_name(0); should print digit error on the screen and place

the cursor at the beginning of the next line.Explanation:

You might be interested in
What are "open-loop" and "closed-loop" systems
frozen [14]

open loop is by the fact that the output signal or condition is neither measured nor “fed back” for comparison with the input signal or system set point. Closed-loop an automatic control system in which an operation, process, or mechanism is regulated by feedback.


6 0
3 years ago
Do you think you should learn to program? Why? why not?
jenyasd209 [6]

Answer:

Yes programming is necessary to achieve goals

Programming helps to build

1)Website

2) Apps

3)Games

4)Security management

Through Making some transaction apps, We are able to pay or receive payments in very short time

So, Programming Saves time and money which is essential in today's world

8 0
4 years ago
What is redundancy? What problems are associated with redundancy?
Anarel [89]

Answer:

Redundancy is the mechanism that occurs in database's data as the same data is stores in the multiple location.It creates repeated data by accident or for backup purpose.

The issues that arise due to the redundancy of the data is the storage space in database gets consumed and thus wastes the space in storing information in multiple locations.When any update occurs in the stored data's field value , it also has to be changed in the multiples occurrences.

5 0
4 years ago
Kurtz &amp; Kemeny created an easy-to-learn programming language called?
vampirchik [111]

BASIC

(Beginners' All-purpose Symbolic Instruction Code)

4 0
3 years ago
When a user inserts a PivotTable, where will it be inserted?
Alexeev081 [22]

Answer:

depends on whether the Pivot Table is inserted into the current worksheet or a new worksheet and the current location of the cursor.

Explanation:

Pivot tables are short tables with few columns and rows out of the original set of rows and columns. And they are being governed by the report filter, and column labels can also be added, as well as rules can be applied to value, but for formulas, we need to create the formula field. However, it can be placed in the current worksheet or a new worksheet and the current location of the cursor.

3 0
3 years ago
Other questions:
  • What does the dashed line in the beaker separating the two sides represent?______________________?
    13·2 answers
  • If a secret key is to be used as a _________ for conventional encryption a single number must be generated.
    13·1 answer
  • Describe three types of physical storage currently used. what usage scenarios would be ideal for each?
    7·1 answer
  • Which quality allows programmers to modify a program as and when required
    11·2 answers
  • In cell B20, enter a function to calculate the average attendance for 2018
    11·1 answer
  • Write a program in java to enter a character.The program displays the message "uppercase vowel" if entered character is uppercas
    5·1 answer
  • When power is completely removed from your computer
    11·1 answer
  • Points! taga pilipinas ba kayo?​
    10·1 answer
  • Please answer questions in complete sentences!
    14·1 answer
  • Canada’s energy plan, named __________, makes three governmental agencies accountable for safeguarding Canada’s environment.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!