- - - - - *
- - - - * - *
- - - * - - - *
- - * - - - - - *
- * - - - - - - - *
* * * * * * * * * * *
Can any body give c++ code for the following pattern?
for (int i=5; i%26gt;=0; --i)
{
for (int j=0; j%26lt;i; ++j) printf("-");
if (i!=5)
{
printf("*");
for (int j=0; j%26lt;(5-i)*2-1; ++j)
printf("%c",(i==0)?'*':'-');
}
printf("*\n");
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment