Tuesday 13 August 2013

Right Angled Triangle 3

Right Angled Triangle in C++ 3:

In this post of shapes in c language you will be able to find and easily understand the code for constructing a top right corner right angled triangle in C++ using "*". 

Purpose of this code of shapes in c:

we make our posts , keeping in mind to enhance the understanding ability of out visitors and help them out to create complex shapes in c programming language.
The codes we post are meant to:
  • Help our visitors to create shapes.
  • Make them aware how to make complex shapes using loops.
  • Helping them out for their different assignments.

Advantages of this code of shapes in c:

This code will help you out in:
  • Understanding the use of nested loops.
  • Appropriately using If and Else conditions.
  • Making codes of triangles of any desired size(// within the size limit of the console).
  • A clear cut help in solving similar problems.



For more visit: triangle programs in c.


Code:
Your desired code is as follows.
/*   Join us at 
 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 size=0; cout << "Enter the size of the right angle triangle\n"; cin>>size; for(int i=0; i<size; i++) { for(int j=0; j<size; j++) { if(i<=j) cout << "*"; else cout << " "; } cout<<endl; }
}

Disclaimer:

We do not appreciate the submission of our codes in your final assignments.These codes are meant to help you out in designing similar problems and provide you with a sense how to deal with such problems.Shapes in c will not take any responsibility for any sort of plagiarism case if you copy pasted our code in your final assignments.







Output:








Right-Angled-Triangle-Shapes-In-C


0 comments:

Post a Comment