fork download
  1. #include <iostream>
  2. using namespace std;
  3. void printZPattern(int n)
  4. {
  5. for(int i=0;i<n;i++)
  6. cout<<"0";
  7. cout<<endl;
  8. if(n>1)
  9. printZPattern(n-1);
  10. }
  11. int main() {
  12. printZPattern(1);
  13. return 0;
  14. }
Success #stdin #stdout 0s 4508KB
stdin
Standard input is empty
stdout
0