Question: prints the sequence of numbers between the two arguments, surrounded by brackets (0) and separated by a comma and a space. Print an increasing sequence

 prints the sequence of numbers between the two arguments, surrounded by

prints the sequence of numbers between the two arguments, surrounded by brackets (0) and separated by a comma and a space. Print an increasing sequence if the first argument is smaller than the second; otherwise, print a decreasing sequence. If the two numbers are the same, that number should be printed by itself. Here are some sample calls to printRange: printRange (2, 7) [2, 3, 4, 5, 6, 7] printRange(19, 11)-> [19, 18, 17, 16, 15, 14, 13, 12, 11] printRange (5, 5) -> (5) Complete the following files: pr.cpp 1 #include 2 using namespace std; 3 #include "pr.h" 4 int printRange(int ni, int n2) 5 { 6 if (n1 > n2) 7 { 8 cout = n2; i--) 10 { 11 cout

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!