fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main() {
  6. for(int i=0;i<4;i++)
  7. {
  8. for(int j=0;j<=i;j++)
  9. {
  10. cout<<"$";
  11. }
  12.  
  13. cout<<"\n";
  14. }
  15. for(int i=2;i>=0;i--)
  16. {
  17. for(int j=0;j<=i;j++)
  18. {
  19. cout<<"$";
  20. }
  21.  
  22. cout<<"\n";
  23. }
  24. return 0;
  25. }
Success #stdin #stdout 0.02s 2724KB
stdin
Standard input is empty
stdout
$
$$
$$$
$$$$
$$$
$$
$