fork download
  1. <?php
  2. $n = 2;
  3.  
  4. if($n < 1){
  5. echo "Number is negative.";
  6. die;
  7. }else if($n%2==0){
  8. echo "This is even number.";
  9. die;
  10. }else if($n<3){
  11. echo "Number is less then 3.";
  12. die;
  13. }
  14.  
  15. for($i=0;$i<$n;$i++){
  16. for($j=0;$j<$n;$j++){
  17. if($i==$n-1 || $j==0 ) {
  18. echo "e";
  19. }
  20. }
  21. if($i == $n-1){
  22. for($i=0;$i<$n;$i++){
  23. for($s=0;$s<$n;$s++){
  24. if($i>0){
  25. echo " ";
  26. }
  27. }
  28. for($j=0;$j<$n;$j++){
  29. echo "*";
  30. }
  31. if($i==$n-1){
  32. for($i=0;$i<$n;$i++){
  33. for($s=0;$s<($n*3)-1;$s++){
  34. if($i>0){
  35. echo " ";
  36. }
  37. }
  38. for($j=0;$j<$n;$j++){
  39. if($i==0 || $j==0 ) {
  40. echo "e";
  41. }
  42. }
  43. echo "\n";
  44. }
  45. }
  46. echo "\n";
  47. }
  48. }
  49.  
  50. echo "\n";
  51. }
  52.  
Success #stdin #stdout 0.02s 26200KB
stdin
Standard input is empty
stdout
This is even number.