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
PYTHON:Given the dictionary, d, find the largest key in the dictionary and associate the corresponding value with the variable v
lapo4ka [179]

di = {5: 3, 4: 1, 12: 2}

val_of_max = di[max(di)]

print(val_of_max)

I hope this helps!

4 0
3 years ago
What tool is included with windows 8 that will help you connect to the directaccess server when you have problems and can be use
Elina [12.6K]
None that I know. Many third party apps.
4 0
3 years ago
This process can be applied to help workers choose the best telecommunications technology to do a specific task.
Lisa [10]
B. Internet Telephony would be my best guess. I'm not that good with computers. Hope this Helps :-)
4 0
3 years ago
Read 2 more answers
Which of the following keys on a keyboard allows you to select multiple cells located in different parts of your worksheet?
MrMuchimi
<span>Hold down the Ctrl key as you click the cells you would like to select.</span>
5 0
3 years ago
Read 2 more answers
Ethics in Al can contribute toward social progress and boost positive changes in society. Which aspect should be removed to achi
ivolga24 [154]

Answer: Hayaa~!

The answer is: . c. bias

Is known when someone purposefully biased an answer towards what they belive or think, this can be avoided by not asking them about topics that we firmly believe they are biased.

Explanation: I took the test

Hope this Helps

-Aaden<3

3 0
2 years ago
Other questions:
  • What kind of firewall can block designated types of traffic based on application data contained within packets?
    7·1 answer
  • In an is framework, ________ is the bridge between the computer side on the left and the human side on the right
    12·1 answer
  • A stop sign is an example of?
    11·2 answers
  • What is the term for a calculation (using encryption technologies) based on the contents of a disk or file that are engineered s
    8·1 answer
  • The methods in a subclass can use all of the data fields and methods that belong to its parent, with one exception: ____ members
    11·1 answer
  • which of the following cells can't be recarged? A. Electrode cell B. wet cell C. primary cell D. storage cell
    13·1 answer
  • What is it called when servers on the Internet supply applications as a service, rather than a product
    14·1 answer
  • THis took FOREVER! please go check it out, if you have seen my demo to this game, you will like the full version! https://scratc
    9·2 answers
  • Write a boolean expression that is true if s references the string end.
    8·1 answer
  • The database cannot be migrated to a different engine because sql server features are used in the application’s net code. The co
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!