fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void pattern2(){
  5. int n;
  6. for(int i=0;i<n;i++){
  7. for(int j=0;j<=n;j++){
  8. cout<<" * ";
  9. }
  10. cout<<endl;
  11. }
  12. }
  13. int main() {
  14. // your code goes here
  15. pattern2();
  16. return 0;
  17. }
Success #stdin #stdout 0.01s 5320KB
stdin
Standard input is empty
stdout
Standard output is empty