Answer to Question #275023 in C++ for Rille

Question #275023

Make a program code reverse the display from N to 1 to 1-N

1
Expert's answer
2021-12-03T17:58:42-0500
#include <iostream>


int main() {
	int n;
	std::cin >> n;
	for (int i = 0; i < n; i++) {
		if (i == n-1) { break; }
		std::cout << i - n << " ";
	}


	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