fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. for(int x=5;x>0;x--) {
  6. switch(x) {
  7. case 5:
  8. cout<<"#####"<<endl;
  9. break;
  10. case 4:
  11. cout<<"####"<<endl;
  12. break;
  13. case 3:
  14. cout<<"###"<<endl;
  15. break;
  16. case 2:
  17. cout<<"##"<<endl;
  18. break;
  19. case 1:
  20. cout<<"#"<<endl;
  21. break;
  22. }
  23. }
  24. return 0;
  25. }
Success #stdin #stdout 0s 3460KB
stdin
Standard input is empty
stdout
#####
####
###
##
#