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
Explain the working system of computer systems with examples​
geniusboy [140]

,I don't know you all about computer

8 0
3 years ago
What are some direct access devices
bija089 [108]
Like a DVD and stuff like that.
3 0
3 years ago
What happens when you click on the colors button in excel?
borishaifa [10]
It writes in that color.
7 0
3 years ago
Suppose two computers (A &amp; B) are directly connected through Ethernet cable. A is sending data to B, Sketch the waveform pro
ICE Princess25 [194]

Answer:

Physical / Data link layer

Explanation:

If two computers (A & B) are directly connected through Ethernet cable. A is sending data to B, the data would be transmitted if the network is clear but if the network is not clear, the transmission would wait until the network is clear.

The Open Systems Interconnection model (OSI model) has seven layers each with its own function.

The physical layer is the first layer responsible for data transmission over a physical link. The data packets are converted to signals over a transmission media like ethernet cable.

The data link layer is the second layer in the OSI layer responsible for transmission of data packets between nodes in a network. It also provides a way of detecting errors and correcting this errors produced as a result of data transmission.

4 0
3 years ago
At the ________ level of an organization, functional managers focus on monitoring and controlling operational-level activities a
Anon25 [30]

Answer:

Tactical Level

Explanation:

Based on the information provided within the question it can be said that the level of the organization that is being mentioned is called the Tactical Level. In this level managers focus choosing the tactics depending on the information that they gather from everyday operational activities. This information is later sent to the higher levels of the organization.

7 0
3 years ago
Read 2 more answers
Other questions:
  • Which software application should be used to create a sales pitch to a group of people? Database Email Presentation Word process
    9·1 answer
  • ​Which SQL keyword is used to search for records?
    8·1 answer
  • Why should you not perform any personal grooming task while driving?
    5·2 answers
  • Renee is creating a multimedia presentation for a website that requires user interaction. Which multimedia type is Renee using?
    5·2 answers
  • Which tab is used to configure editing restrictions in Word 2016? Review References Security Developer
    6·2 answers
  • Ergonomically designed workstations and equipment reduce stress-related injuries and improve the productivity and efficiency of
    13·2 answers
  • Jack used primarily web sources for his informative speech about gun control. however, his over-reliance on the web site sponsor
    11·1 answer
  • A RISC processor has 186 total registers, with 18 global registers. There are 12 register windows, each with 10 locals. How many
    5·1 answer
  • Hmm what should i do with this information
    14·2 answers
  • For a certain company, the cost function for producing x items is C(x)=50x+100 and the revenue function for selling x items is R
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!