fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int n;
  6. cin>>n;
  7. for(int i=1;i<=n;i++)
  8. {
  9. for(int j=n;j>=i;j--)
  10. {
  11. /*if(j<i)
  12. {
  13. printf("*");
  14. }
  15. else
  16. {
  17. printf(" ");
  18. }*/
  19. printf("*");
  20. }
  21. printf("\n");
  22. }
  23.  
  24.  
  25. // your code goes here
  26. return 0;
  27. }
Success #stdin #stdout 0s 5412KB
stdin
5
stdout
*****
****
***
**
*