fork(1) download
  1. import 'dart:io';
  2.  
  3. void main() {
  4. int n = 5;
  5. if(n%2 == 0){
  6. return;
  7. }
  8.  
  9. int row = 3*n;
  10. int col = 2 *n;
  11. int spaceBefore = 1;
  12. int spaceAfter = 2*n-1;
  13.  
  14. for(int i = 1; i<=n; i++){
  15. if(i<n){
  16. print("*"*spaceBefore + " "*spaceAfter);
  17. }else if(i==n){
  18. print("*"*n+ " "*n);
  19. }
  20.  
  21.  
  22. }
  23.  
  24.  
  25.  
  26. }
Success #stdin #stdout 1.23s 127672KB
stdin
Standard input is empty
stdout
*         
*         
*         
*         
*****