BS IT
Sunday, 4 November 2012
loop program
#include<iostream>
using namespace std;
int main()
{
int i,j,s;
for(i=5;i>=1;i--)
{
for(s=1;s<=5;s++)
cout<<" ";
for(j=1;j<=i;j++)
cout<<"* ";
cout<<"\n";
}
return 0 ;
}
output:
*****
****
***
**
*
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment