• Exclusive

    Hey Guest, unlock an instant 10% bonus discount when you upgrade via the Crypoverse gateway.

Login:Pass Pattern Printing (1 Viewer)

Currently reading:
 Login:Pass Pattern Printing (1 Viewer)

Simple Email:Pass Combolist all domains.
Recently searched:

zorojuro

Member
LV
0
Joined
Apr 25, 2024
Threads
1
Likes
0
Credits
170©
Cash
0$
C++:
#include<iostream>
using namespace std;

int main(){
    int n;
    cout << "Enter the Rows: ";
    cin >> n;

   for(int i=1;i<=n;i++){
    for(int j=0;j<4+n-i;j++){
        if(i==1 || i == n){
            cout << '*';
        }
        else {
            cout << " ";
        }
    }

    for(int k=0 ; k<2*i -1 ; k++){
        if(k%2 == 0){
            cout << i;
        }
        else{
            cout << "*";
        }
    }

    for(int j=0;j<4+n-i;j++){
        if(i==1 || i == n){
            cout << '*';
        }
        else {
            cout << " ";
        }
    }
    cout << endl;
   }
}
Download:
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Tips
Recently searched:

Users who are viewing this thread

Top Bottom