{"id":34674802,"url":"https://github.com/ammara-masood06/c_plus_plus_hourglass_pattern","last_synced_at":"2026-05-26T06:06:18.909Z","repository":{"id":323715936,"uuid":"1094413099","full_name":"Ammara-Masood06/C_plus_plus_HourGlass_Pattern","owner":"Ammara-Masood06","description":"C++ Hourglass Pattern Generator ⏳ Builds a dynamic, user-defined pattern using nested loops. Perfect for demonstrating fundamental C++ control flow and I/O mastery.","archived":false,"fork":false,"pushed_at":"2025-11-11T17:20:21.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-26T08:58:40.084Z","etag":null,"topics":["cplusplus","forloop","hourglasspattern","nested-for-loops","nested-loops","patterns"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ammara-Masood06.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-11T17:13:51.000Z","updated_at":"2025-11-11T17:29:36.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Ammara-Masood06/C_plus_plus_HourGlass_Pattern","commit_stats":null,"previous_names":["ammara-masood06/c_plus_plus_hourglass_pattern"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Ammara-Masood06/C_plus_plus_HourGlass_Pattern","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ammara-Masood06%2FC_plus_plus_HourGlass_Pattern","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ammara-Masood06%2FC_plus_plus_HourGlass_Pattern/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ammara-Masood06%2FC_plus_plus_HourGlass_Pattern/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ammara-Masood06%2FC_plus_plus_HourGlass_Pattern/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ammara-Masood06","download_url":"https://codeload.github.com/Ammara-Masood06/C_plus_plus_HourGlass_Pattern/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ammara-Masood06%2FC_plus_plus_HourGlass_Pattern/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33506533,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T03:12:49.672Z","status":"ssl_error","status_checked_at":"2026-05-26T03:12:47.976Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cplusplus","forloop","hourglasspattern","nested-for-loops","nested-loops","patterns"],"created_at":"2025-12-24T20:19:48.569Z","updated_at":"2026-05-26T06:06:18.904Z","avatar_url":"https://github.com/Ammara-Masood06.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"**Dynamic Hourglass Pattern Generator in C++**\nThis C++ console application creates a visual hourglass pattern of customizable size based on user input. It is an excellent demonstration of nested loop management and foundational C++ programming logic.\n\n**⚙️ How It Works**\nThe pattern is constructed by printing characters (^) and strategic spacing in two distinct phases:\n\n**1. Upper Half: The Inverted Pyramid**\nThis section is responsible for the top half of the hourglass, where the pattern starts wide and narrows to the center.\n\n**Outer Loop (i):** Iterates from the first row (1) up to the user-specified row count (r).\n\n**Space Loop (j):** Prints the leading spaces before the characters. The number of spaces increases with each row (i), which pushes the pattern inward, creating the indentation.\n\n**Character Loops (k and l):** These loops are used to print the ^ characters. As the row number (i) increases, the number of characters printed decreases, causing the pattern to taper towards the center.\n\n**Output:** Each iteration ends with cout \u003c\u003c endl; to move to the next row.\n\n**2. Lower Half:** The Regular Pyramid\nThis section completes the hourglass by mirroring the top half, starting from the narrowest point and widening back out.\n\n**Outer Loop (i):** Iterates from the widest row back up to 1 (r down to 1) to control the size progression.\n\n**Space Loop (j):** Prints leading spaces. The number of spaces decreases as the pattern widens, pulling the characters back towards the margins.\n\n**Character Loops (k and l):** As the loop progresses, the total number of characters printed increases, causing the pattern to widen back out and complete the visual hourglass shape.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fammara-masood06%2Fc_plus_plus_hourglass_pattern","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fammara-masood06%2Fc_plus_plus_hourglass_pattern","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fammara-masood06%2Fc_plus_plus_hourglass_pattern/lists"}