Tuesday, 13 August 2013

Lower Parallelogram

Lower Parallelogram:

In this post of shapes in c language, you will find the code to draw lower parallelogram in C++ using "*". 

Purpose of this code of shapes in c:

In this post we have provided our visitors with a c++ sample program to draw complex shapes such a lower parallelogram. This code will draw a parallelogram specified size.
The codes we post are meant to:
  • Help our visitors to draw shapes.
  • Make them aware how to create shapes using loops in c programming language.
  • Helping them out for their different assignments.

Benefits from this code of shapes in c:

There are many benefits of this code for our visitors.After studying this code you will be able to carry out the following benefits:
  • Easily understand the use of nested loops.
  • Appropriate use of If Else conditions.
  • Make a generic codes to draw a numbered parallelogram of any desired size as well(// within the size limit of the console).
  • A clear cut help in designing similar program.

Code:

Copy the code from here.
/* Join http://shapesinc.blogspot.com for more codes of shapes */
#include<iostream>
using namespace std;
int main() { cout << "Join http://shapesinc."<<"blogspot.com for more codes of shapes\n\n"; 
cout<<"CAUTION:   The input should not be other than numerical values \n\n\a";
int length=0; 
cout << "Enter the length of the lower parallelogram\n";
cin>>length;

 for(int i=0, k=0, l=3*length-3; i<length; i++, k++, l--)
 {
 for(int j=0; j<3*length; j++)
 {
 if(j>=k && j<=l)
  cout << "*";
 else
  cout << " ";
 }
 cout<<endl;
 }
}



Note:

Shapes in c is basically a forum for the programmers , who visit it and find the proper solution for their problems.The codes we post here are meant to help out our visitors to understand a problem and not for using in final submissions of assignments.We will not take any responsibility for any sort of plagiarism case if you copy pasted our code in your final assignments.






Output:





Lower_Parallelogram_Shapes_In_c

0 comments:

Post a Comment