+ 1
How to print pattern A using asterisk and by for loop in python?
program for first albhabet
3 ответов
+ 7
#include <iostream>
using namespace std;
int main() {
    int size = 6;
    for(int i = 0; i < size; i++)
    {
        for(int space = size - 2; space >= i; space--) {
            cout << " ";
        }
        cout << "*";
        
        for(int space = 0; space < i; space++) {
            if(i == (size / 2))
                cout << "**";
            else
                cout << "  ";
        }
        cout << "*";
        
        cout << endl;
    }
    return 0;
}
+ 1
thanks



