fork download
  1. // Online C++ compiler to run C++ program online
  2. #include <iostream>
  3. using namespace std;
  4.  
  5. int main() {
  6. int n;
  7. cin>>n;
  8.  
  9. if(n<0 || n%2==0|| n==1){
  10. return 0;
  11. }
  12.  
  13. if(n%2!=0){
  14. for(int i=0;i<n+2;i++){
  15. cout<<"*";
  16. }
  17. }
  18. cout<<endl;
  19.  
  20. int i,j;
  21. for(i=0;i<n;i++){
  22.  
  23. for(j=0;j<=n/2;j++){
  24. cout<<" ";
  25.  
  26. }
  27. cout<<"e"<<endl;
  28.  
  29. }
  30.  
  31. return 0;
  32. }
Success #stdin #stdout 0.01s 5280KB
stdin
-8
stdout
Standard output is empty