You need to change this code so that the answer is displayed as a rhombus, not a square. I do not understand how this can be done.
#include <stdio.h> #include <windows.h> int main() { unsigned char n,k,symbol; for (n = 1; n<=5; n++) { symbol = 'I' - (n-2)*2; for (k = 1; k<=n-1; k++) { printf ("%2c", symbol); symbol = symbol + 2; } printf (" A"); symbol = 'C'; for (k = 1; k<=5-n; k++) { printf("%2c", symbol); symbol += 2; } printf("\n"); } system("pause"); return 0; } The final result should be as follows:
