-->





Translate

C++ Shapes Code

Draw hollow diamond shape in c++ code in which user enter its desire size of diamond 

Using nested for loop and asterisk

like below image: click here to get code
Draw hollow diamond shape in c++ code in which user enter its desire size of diamond

 

Draw inverted triangle on output console using nested for loop and asterisk '*' character

Like Below Image click here or image to find code 

http://fahad-cprogramming.blogspot.com/2014/02/inverted-triangle-shape-in-c-code-using.html

inverted triangle c++ code

 

write a c++ program which draw a hollow triangle on output console using nested for loop and asterisk character

Like Below image Click here to get code

http://fahad-cprogramming.blogspot.com/2014/02/hollow-triangle-shape-in-c-programing.html

draw a hollow triangle


 

write a C++ code which draw an isosceles triangle using nested for loop

Like Below Image click here to get code

 which draw an isosceles triangle using nested for loop

which draw an isosceles triangle using nested for loop

 

 write a program to draw Upside down filled isosceles triangle code  using for loop C++ code
Like Below Image click here to get code
 upside down filled isosceles triangle code C++ sample image for output

upside down filled isosceles triangle code C+





C++ code to print right triangle pattern using for loop
Click on image to view code:


 code to print right triangle pattern using for loop


C++ Code Box Shape :
Click on image to view full code 
box shape using for loop 











 Hollow Box shape using for loop and if else statement

sample output : click on image to view full code
   \for loop c++ shapes code



C++ SHAPES:

CODE SHAPES 





USING NESTED FOR  “*”.

*

**

***

****

*****

CODE

#include<iostream.h>

#include<conio.h>

void main()

{

   clrscr();

   for(int i=1; i<=5; i++)

   {

      for(int j=1; j<=i; j++)

      {

cout<<"*";

      }

cout<<endl<<endl;

  }

   getch();

}

C++ SHAPES:

CODE SHAPE USING NESTED FOR  “*”.

*****

****

***

**

*

#include<iostream.h>

#include<conio.h>

void main()

{

   clrscr();

   for(int i=5; i>=1; i--)

   {

      for(int j=1; j<=i; j++)

      {

cout<<"*" ;

      }

cout<<endl<<endl;

   }

   getch();

}

C++ SHAPES:

CODE SHAPES USING NESTED FOR  “*”.

           *

      **

    ***

  ****

*****

#include<iostream.h>

#include<conio.h>

void main()

{

   clrscr();

   for(int i=1; i<=5; i++)

   {

      for(int k=5; k>i;  k--)

      {

      cout<<" ";

      }

      for(int j=1; j<=i; j++)

      {

cout<<"*";

      }

cout<<endl<<endl;

   }

   getch();

}

C++ SHAPES:

CODE SHAPES USING NESTED FOR  “*”.

 *****

   ****

     ***

       **

         *

#include<iostream.h>

#include<conio.h>

void main()

{

   clrscr();

   for(int i=5; i>=1; i--)

   {

      for(int k=5; k>i;  k--)

      {

         cout<<" ";

       }

      for(int j=1; j<=i; j++)

      {

cout<<"*";

      }

cout<<endl;

   }

   getch();

}

CODE SHAPES USING NESTED FOR  “*”.

1*****

12****

123***

1234**

12345*

123456

#include<iostream.h>

#include<conio.h>

void main()

{

   clrscr();

   for(int i=1; i<=6; i++)

   {

      for(int k=1,a=1; k<=i; k++)

      {

       cout<<a; a++;

      }

      for(int j=5; j>=i; j--)

      {

cout<<"*";

      }

cout<<endl<<endl;

   }

   getch();

}