fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // Pattern22
  6. int n;
  7. cin>>n;
  8. for(int i=1;i<=n;i++){
  9. for(int j=i;j<=n;j++){
  10. cout<<"&";
  11. }
  12. cout<<endl;
  13. }
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24. return 0;
  25. }
Success #stdin #stdout 0.01s 5408KB
stdin
5
stdout
&&&&&
&&&&
&&&
&&
&