fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int n;
  6. cout<<"Enter any number: ";
  7. cin>>n;
  8. if(n%2==0 || n<0 || n==1){
  9. cout<<"Please enter a number greater than or equal to 3";
  10. } else {
  11. for(int i=0; i<=n; i++) {
  12. cout<<"e"<<endl;
  13. }
  14. for (int i=0; i<=0; i++) {
  15. for(int j=0; j<=n+1; j++){
  16. cout<<"e";
  17. }
  18. }
  19. cout<<endl;
  20. for(int i=0; i<n; i++){
  21. for(int j=0; j<=n; j++){
  22. cout<<" ";
  23. }
  24. for(int j=0; j<=i; j++) {
  25. cout<<"@";
  26. }
  27. cout<<endl;
  28. }
  29. }
  30. return 0;
  31. }
Success #stdin #stdout 0.01s 5304KB
stdin
11
stdout
Enter any number: e
e
e
e
e
e
e
e
e
e
e
e
eeeeeeeeeeeee
            @
            @@
            @@@
            @@@@
            @@@@@
            @@@@@@
            @@@@@@@
            @@@@@@@@
            @@@@@@@@@
            @@@@@@@@@@
            @@@@@@@@@@@