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