+ 1

How to print pattern A using asterisk and by for loop in python?

program for first albhabet

18th Oct 2018, 5:34 AM
Arpita
Arpita - avatar
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; }
18th Oct 2018, 6:12 AM
blACk sh4d0w
blACk sh4d0w - avatar
+ 1
thanks
19th Oct 2018, 4:32 AM
Arpita
Arpita - avatar