Tuesday 13 August 2013

Hollow Right Angled Triangle 2

Hollow Right Angled Triangle in C++ 2:

In this post of shapes in c language, you will find the code for constructing a Hollow top left right angled triangle in C++ using "*". 

Purpose of this code of shapes in c:

This code of shapes in c has been posted with the purpose to help our visitors to use simple c++ programming tools to draw complex shapes in c language.
The main purpose of this code is to:
  1. Help our users to develop a sense to come up with an optimized solution of problems .
  2. Help them out to program their assignments.
  3. Resolve their general coding related issues.

Advantages of this code of shapes in c:

After thorough study of this code you will be able to :
  1. Use the loops in different ways.
  2. Understand the concept of nested loops.
  3. Come up with a better solution of problems.
  4. Precisely use if else conditions properly.

Code:


For more visit: triangle programs in c.


Code:

/*              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 hollow triangle\n";
cin>>size;
for(int i=0 ; i<=size ; i++)
{
for(int j=i ; j<=size ; j++)
{
if(i==0)
       cout<< "* ";
else 
if(j==i || j==size)
cout<<"* ";
       else
cout<<"  ";
}
cout<<endl;
}
return 0;
}



Disclaimer:

We do not appreciate the submission of our codes in your 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. - See more at: http://shapesinc.blogspot.com/2013/08/hollow-right-angled-triangle-in-c-4.html#sthash.Gy79gyHj.dpuf
These codes are meant to help you out in designing similar problems and provide you with a sense how to deal with such problems.Submission of our codes in your final assignments is not appreciated.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