Answer to Question #55257 in C++ for kamugisha pacifique

Question #55257
Write a c++ program to display this series of numbers in descending order(1,2,3,4,5,6,7,8,9)
1
Expert's answer
2015-10-07T04:12:34-0400
#include <cstdio>
#include <iostream>
using namespace std;

int main() {
long long left, right;
puts("Enter left bound.");
cin >> left;
puts("Enter right bound.");
cin >> right;
for (; right >= left; cout << right << " ", right--);

return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS