Your program is required to read a single line of input from the user (without printing any input prompt), which is expected to be a positive integer n. You can freely assume this will be a positive integer, and it's not important what you do in any other case; we'll only test your program with positive integer input. You can also freely assume that n will not be greater than 999.
After reading the input, your program will print a block pyramid of size n. The bottom level of the pyramid will be n blocks wide, the level just above that will be n − 1 blocks wide, and so on, with the top level consisting of a single block. Each level's blocks are centered with respect to the blocks on the level below.
The precise format is best demonstrated with an example. If the input to the program was 3, the output would look like this:
See attached image.
A few additional requirements apply:
- Though I've indented the text above to set it apart from the rest of this project write-up, note that the bottom level of blocks must begin in the leftmost column of the output (i.e., it should not be indented).
- There must be no spaces after the last * character on each line.
- There must be a newline character on the end of each line, including the last one.
Hello, I am expert in java/c/c++ and i can deliver your task in the least time and least payments. The code will be well commented
and well formatted for better understanding. I believe in long term relations so first check your work then release the
payments.
Pm me for further details. Thank You!
Hello
My name is Ahmed, i'm a top rated freelancer.
i worked over 250 projects and over 600 hours doing C++ and Java projects.
small overview of feedback on my profile
"you want to get your projects completed with quality? Hire Ahmed. Highly recommended."
"Thoroughly satisfied with Ahmed, and would recommend him for anyone looking for an excellent developer!"
"Highly recommended. Very smart and well experience"
looking forward to work with you
Regards
I am strong C++ developer and have strong algorithm knowledge. I assure you great quality work and within 1 day. I am open to any further improvements to the deliverable. Please hire me!
Hi
my whats app
+923245064587
.............................................................................................................................................
I'm computer engineering TA with 10+ years of experience.
I'm experienced with data structures and algorithms , computation theory , discrete math and competitive programming
I will solve all your problems perfectly in short amount of time and could help you understanding them
Dear Sir/Madam,
Hope you will be doing good today.
I have strong experience in development in C language. I already have a program written to display pyramid blocks. I can modify it to meet your requirements.
I need to understand one thing. Based on your example of input 3, there should be only 2 rows. The bottom one containing 3 asterisks and upper one with only 1 asterisk. But your output is different. Can you please elaborate more on this?
I can provide you the code immediately. I look forward to hearing from you soon.
Best Regards,
Arsalan Mansoor.
I write programs with an intention of creating an art. I treat every program i write as piece of gem, i polish it in every aspect, make sure bugs free and it should never break in any time.