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]
3 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]3 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
If you need to add more data between column A and column B, you should _____. click in column A and paste a column click anywher
Luda [366]

Answer:

Use the insert column command by placing your cursor between A and B. Then insert your data

Explanation:

3 0
3 years ago
which computer career field enables you to create and design interactive multimedia products and services
dusya [7]
I think its graphic design 
4 0
3 years ago
If I had to choose the class I prefer it would be a
dmitriy555 [2]
How about you prefer no class
4 0
3 years ago
Which of the following is a characteristic of the college savings plan
Hoochie [10]

add the choices please

8 0
3 years ago
Read 2 more answers
Hey plz help me with this<br>What is malware short for?​
soldier1979 [14.2K]

Answer:

Malware is the collective name for a number of malicious software variants, including viruses, ransomware and spyware. Shorthand for malicious software, malware typically consists of code developed by cyberattackers.

Explanation:

4 0
2 years ago
Other questions:
  • witch of the following is a good way to choose your location as you develop your study method? A. Going where most of your frien
    6·1 answer
  • A) What is the maximum value that can be represented as an unsigned n-bit binary integer?
    13·1 answer
  • Which of the following commands contains an error?
    8·1 answer
  • When talking about changes related to information​ technology, the text identifies three interrelated changes that are responsib
    8·1 answer
  • Write a function called has_duplicates that takes a string parameter and returns True if the string has any repeated characters.
    7·1 answer
  • Scenario
    7·1 answer
  • Need help ASAP.<br> I am so lost.
    5·1 answer
  • Python Coding:
    15·1 answer
  • Summary about Interface Design in system analysis
    12·1 answer
  • 1. Sunday Times wants an analysis of the demographic characteristics of its readers. The
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!