int main() { int N = 4; int r=4, c=4; for (int i = 1; i <= r; ++i) { for (int j = 1; j <= c; ++j) { if(j%4 == 0 || j%4 == 1) printf("*"); else if(i%4 == 0 || i%4 == 1) printf("*"); else printf(" "); } printf("\n"); } }
How to create a c program to print a alphabet in the form of stars for ex. A should be printed something like
* * * ***** * *
Do we have any standard algo???
Given an ODD number, print diamond pattern of stars recursively.
Example Input: n = 5,
Output:
* *** ***** *** *