main.c
#include <stdio.h> // Define the Unicode block characters for the colors #define ORANGE_BLOCK "🟧" // Orange block #define WHITE_BLOCK "⬜" // White block #define BLUE_BLOCK "🔵" // Blue block #define GREEN_BLOCK "🟩" // Green block int main() { // Number of blocks per line int blocks_per_line = 25; int lines_per_color = 3; // Number of white blocks on each side of the blue blocks int white_blocks_side = 13; int blue_blocks_center = 3; // Print the Indian flag for (int i = 0; i < lines_per_color; i++) { for (int j = 0; j < blocks_per_line; j++) { printf("%s", ORANGE_BLOCK); // Print orange blocks } printf("\n"); } for (int i = 0; i < lines_per_color; i++) { // Print the white blocks on the left for (int j = 0; j < white_blocks_side; j++) { printf("%s", WHITE_BLOCK); } // Print the blue blocks in the center for (int j = 0; j < blue_blocks_center; j++) { printf("%s", BLUE_BLOCK); } // Print the white blocks on the right for (int j = 0; j < white_blocks_side; j++) { printf("%s", WHITE_BLOCK); } printf("\n"); } for (int i = 0; i < lines_per_color; i++) { for (int j = 0; j < blocks_per_line; j++) { printf("%s", GREEN_BLOCK); // Print green blocks } printf("\n"); } printf("********************************************************\n"); printf("* *\n"); printf("* Happy 78th Independence Day! *\n"); printf("* *\n"); printf("********************************************************\n"); return 0; }
Output