HomeHome  SearchSearch  RegisterRegister  Log in  

Share | 
 

 PATTERNS C++

View previous topic View next topic Go down 
AuthorMessage
Anupam (Administrator)
Admin
avatar

Posts : 117
Join date : 2012-02-25

PostSubject: PATTERNS C++   Sat Nov 24, 2012 7:26 pm



Quote :
#include<iostream>

using namespace std;

int main()
{
int i,j;

cout<<"(a)";
cout<<"\n";
for(i=1;i<=10;i++)
{
for(j=1;j<=i;j++)
{
cout<<"*";

}
cout<<"\n";
}

cout<<"\n";
cout<<"(b)";
cout<<"\n";
for(i=10;i>0;i--)
{
for(j=i;j>0;j--)
{
cout<<"*";

}
cout<<"\n";
}

cout<<"\n";
cout<<"(c)";
cout<<"\n";
for(i=1;i<=10;i++)
{
cout<<" ";
for(i=2;i<=10;i++)
{
cout<<"*";
}




}


return 0;
}
Back to top Go down
View user profile http://milanstopper.fullboards.com
 
PATTERNS C++
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» Crown Lynn Chateau and Elevenhood Patterns from John
» Free embroidery patterns
» Free Crochet Graph Patterns - pdf
» KNIT: Free Doll Clothes Patterns
» Free Paper Piecing Patterns

Permissions in this forum:You cannot reply to topics in this forum
 :: PUBLIC :: C++ TUTORIALS-
Jump to: