Tuesday , December 6 2016
Home / C / c program to print the desired shape empty or filled

c program to print the desired shape empty or filled

First parameter should be a character to choose the shape that will be printed.
It could be ‘T’ or ‘t’ for triangle,
‘R’ or ‘r’ for rectangle,
‘P’ or ‘p’ for parallelogram,
‘D’ or ‘d’ for diamond.
Second parameter should be a number which identifies the height of the shape.
The height should be minimum 2 for triangle, rectangle and parallelogram.
The height should be minimum 3 and an odd number for diamond.

Third parameter should be a number which identifies the width of the shape.
The width should be minimum 2 for rectangle and parallelogram.
The width should be assumed equal to the height for diamond and triangle. Therefore
if the selected shape is diamond or triangle, width don’t have to be asked to user.

Forth parameter should be a character which identifies the emptiness of the shape.
It could be ‘E’ or ‘e’ for empty shape,
‘F’ or ‘f’ for full shape.
Fifth parameter should be character that will be used for printing shape.

Also See:   Restrict Mouse Pointer Position C Graphics Program

Check Also

Hide Mouse Pointer C Program

How to Hide a Mouse Pointer Program in C : This program will show and hide ...

Leave a Reply

Your email address will not be published. Required fields are marked *

Preventing spam * Time limit is exhausted. Please reload the CAPTCHA.