Menu Close

Print a Canada Map in C Program

Posted in C Program Exercises

Here’s an example code to print a basic map of Canada using ASCII characters in C:

Canada Map
Canada Map

 

#include <stdio.h>

int main() {
    printf("         __...__\n");
    printf("    ,--'    __\\_\\\n");
    printf("  ,'    ,--'      \\\n");
    printf(" /    ,'     ,----'\n");
    printf("(    (_)\\___/\n");
    printf(" \\     _,`---`\n");
    printf("  `--'       \n");
    printf("      /\\_    \n");
    printf("     /  |  \n");
    printf("    /   / \n");
    printf("   /    | \n");
    printf("  /     | \n");
    printf(" |      | \n");
    printf(" |      | \n");
    printf(" |      | \n");
    printf("  \\     | \n");
    printf("   `\\__,' \n");
    printf("\n");
    return 0;
}

This will output a simple map of Canada using ASCII characters that roughly resembles its shape.

Related:   Write a C Program to Check if a Given Number is a Palindrome or not

Leave a Reply