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
weqwewe [10]
4 years ago
9

Modify the countUp( ) you wrote in the previous question to countUp( num), where num is a parameter. The function displays from

1 to num.
Computers and Technology
1 answer:
algol [13]4 years ago
4 0

Answer:

void countUp(int num)

{

   if(num==0) //base case.

   return;

   countUp(num-1);//Recursive call.

   cout<<num<<" "; //printing the number.

}

for input num=25

Output:-1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

Explanation:

I have used recursion to print the numbers the function is in c++ language.In every recursive call we are decreasing num by 1.As the base case is reached.Then it will backtrack from 1 to num and then we are printing while backtracking.

You might be interested in
The windows desktop contains a start button in its lower-right corner, which can be used to start the computer.
WITCHER [35]
If you are referring to the actual desktop interface inside windows, it goes down to what version you would have. But to my knowledge, there is no start button in the lower right corner. 
6 0
4 years ago
Match each storyboarding technique with its appropriate description.​
suter [353]

Answer:

Hierarchical – Option C

Linear – Option D

Webbed - Option A

Wheel - Option B

Explanation:

Hierarchical means something that follows the order from general to specific .  

Hierarchical – Option C

Linear means something that follows the order from general to specific .

Linear – Option D

Webbed – There is no order in flow of information or it is inconsequential. Hence, option A

Wheel - means the flow is sequential i.e as per the sequence

Wheel – Option B

5 0
3 years ago
Which statement best justifies the use of a high-speed cache in a CPU?
crimeas [40]

Cache memory is a high-speed memory that stores the instructions and data that have been frequently accessed.  It decreases the time it takes to decode the instructions stored in the instruction pipeline.

A.  It decreases the time it takes to decode instructions stored in the instruction pipeline.

<u>Explanation:</u>

Whenever an instruction is invoked or some data is accessed, the CPU looks for it in the cache memory before accessing the main memory.

If the content is found in the cache memory, it accessed from there and then and hence the access time and decode time is reduced as there were no main memory lockups.

6 0
3 years ago
Q#1.What general categories of functions are specified by computer instruction?
natali 33 [55]
Is this for a test, because someone else asked that like 5 seconds ago.

4 0
4 years ago
What are the two common architectures used to process data
vitfil [10]
The two most common architectures used (by CPUs as I am assuming your question means) are x86 (32-bit) and x64 (64-bit).
32-bit processes multiple instructions with a single request while 64-bit adds registers for instructions that use 64-bit address space.
8 0
3 years ago
Other questions:
  • In the lab, you used the filter box in Wireshark to remove traffic from port 3389. What is that port used for? What filter synta
    12·1 answer
  • Return to the Product Mix worksheet. Benicio wants to provide a visual way to compare the scenarios. Use the Scenario Manager as
    6·1 answer
  • ________ software helps run the computer and coordinates instructions between other software and the hardware devices.
    7·1 answer
  • A résumé can be delivered through _____.a.
    9·2 answers
  • How did AI help in creating the Cognitive dress for Marchesa?
    5·1 answer
  • What component is most likely to be installed in a PC, is considered primary storage, and typically stores the operating system,
    6·1 answer
  • What is the correct html element for playing audio files?
    11·1 answer
  • Given the following structure and variable definitions, struct customer { char lastName[ 15 ]; char firstName[ 15 ]; unsigned in
    6·1 answer
  • The Bellman-Ford algorithm for the shortest path problem with negative edge weights will report that there exists a negative cyc
    13·1 answer
  • If one of the resistors is turned off (I.e. , a light bulb goes out), what happens to the other resistors (light bulbs) in the c
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!