Answer to Question #287338 in C++ for Abebe

Question #287338

write a program that create the following number patern.


1 2 3 4 5 6 7 8 9


1 2 3 4 5 6 7 8


1 2 3 4 5 6 7


1 2 3 4 5 6


1 2 3 4 5


1 2 3 4


1 2 3

1
Expert's answer
2022-01-14T13:46:03-0500
#include <iostream>


using namespace std;
int main() {
	int n=10;
	for(int k=0;k<7;k++){
		for (int i = 1; i < n; i++) {
			cout <<i<<" ";
		}  
		cout <<  "\n";
		n--;
	}
	system("pause");
	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