Write a C++ program to display the pyramid pattern of numbers 0 to 9 (decimal digits) withn rows, wheren is in the range between 1 and 10. Theith row ( 0 ≤i≤n – 1) is a sequence starting from numberi,decreasing by 1 until it reaches 0, and increasing by 1 until it reachesi.
The variablen should be entered by the user. If the user input is between 1 and 10 then output the pyramid of numbers together with the average of the numbers, otherwise prompt the user to enternagain. The program should end with inputq.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here