Question: Write C a program called triangles that accepts command line arguments for a height ( h ), a character ( c ), orientation ( o

Write C a program called triangles that accepts command line arguments for a height (h), a character (c), orientation (o) and justification (j). The program will print a triangle of height h using the c character with orientation (Up or Down) and justification (Left, Right or Center). The usage should be something like triangles h c o j.

Some examples:

Command: triangles 4 ? U L

Prints: Upward pointing, left-justified triangle of height 4 using the ? character, as follows:
? ?? ??? ????

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!