* pattern output using C++ second
Print Star Triangle
#include<iostream.h> #include<conio.h> using namespace std; main() { int i, j, k; for(i=5;i>=1;i--) { for(j=1;j<i;j++) { cout<<" "; } for(k=5;k>=i;k--) { cout<<"*"; } cout<<"\n"; } getch(); }
Output
* * * * * * * * * * * * * * *
0 on: "* pattern output using C++ second"