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
Write 5 things that can be done to avoid computer vision syndrome
weeeeeb [17]
Get a comprehensive eye exam.
Use proper lighting.
Minimize glare.
Upgrade your display.
Adjust your computer display settings
Blink more often.
Exercise your eyes.
Take frequent breaks.
6 0
3 years ago
Read 2 more answers
with the current computer development, explain 5th areas where computer is applied for the social economic dwvelopment in societ
AleksandrR [38]

Explanation:

just want points tbh but have a good day

7 0
3 years ago
When powering off your computer is best down using?
MAXImum [283]

command prompt shutdown/s or alt f4


7 0
3 years ago
Read 2 more answers
Less than 40 percent of teens have used marijuana within the past year. True or false?
fgiga [73]
That is true. I hope this helps
6 0
3 years ago
The first row in a table is referred to as the _____ row and the last row is considered the _____ row.
Juliette [100K]

the first row in a table is classed as the header row.

and with the last one I'm not sure because as far as I know there's not considered a last row.

6 0
3 years ago
Other questions:
  • To apply format to text, both the text and the text box must be selected.
    13·1 answer
  • Generally speaking, mobile sites are good for acquiring new customers and inspiring new relationships while mobile apps are good
    6·1 answer
  • Checking the ___________ will reduce the possibility of having to rebuild or replace the engine.
    9·2 answers
  • How important is technology in education? what technology-related skills can you contribute to a school district answers?
    13·1 answer
  • Which principle of animation deals with imparting a unique identity to the animated character?
    5·1 answer
  • What are the types of hypervisiors ?
    5·2 answers
  • Nate wants to copy the style of his contact address to the normal template. Complete the paragraph to describe how he can access
    6·1 answer
  • Which of the following contributes to your active digital footprint
    12·2 answers
  • What does the statement that follows do? double gallons[6] = { 12.75, 14.87 }; a. It assigns the two values in the initializatio
    13·1 answer
  • State any three points of importance of local level profession​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!